{
"message": "The selected model does not support Text To Image.",
"errors": {
"model": [
"The selected model does not support Text To Image."
]
}
}
{
"message": "Too Many Attempts."
}
API v1 is deprecated. This version is no longer being developed — new endpoints, parameters and models are added
to v2 only. Use the v2 endpoints to stay current: v2 API documentation.
Text-to-Speech converts text into natural-sounding audio. The endpoint supports three TTS modes via the mode parameter:
custom_voice (default) — Use a preset voice from the model’s voice library. Requires the voice parameter.
voice_clone — Clone a voice from a short reference audio clip. Requires the ref_audio parameter (3–10 seconds, max 15 MB). Optionally provide ref_text with a transcript of the reference audio for improved accuracy.
voice_design — Create a new voice from a natural language description. Requires the instruct parameter (e.g. "A warm female voice with a British accent").
Prerequisite: To ensure a successful request, you must first consult the Model Selection endpoint to identify a valid model slug, check specific limits and features, and verify available languages and voices.
Mode-specific required fields:
custom_voice — voice is required.
voice_clone — ref_audio is required. ref_text is optional but recommended.
voice_design — instruct is required.
If mode is omitted, the API defaults to custom_voice.
Reference audio file for voice cloning. Supported formats: mp3, ogg, m4a. Max 15MB. Duration must be between 3-10 seconds (model-specific limits may apply). Required for voice_clone mode.
Natural language voice description for voice_design mode (e.g. "A warm female voice with a British accent"), or style/emotion control in custom_voice mode.
Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. See Webhook Documentation for payload structure and authentication details.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"deAPI","colors":{"primary":"#FD9A00","light":"#FFAD33","dark":"#E58A00"},"logo":{"light":"https://mintcdn.com/deapi-f9ba3abb/gSOvhf4F2Dm8oAad/logo/deapi-light.svg?fit=max\u0026auto=format\u0026n=gSOvhf4F2Dm8oAad\u0026q=85\u0026s=e44c94d9c161aa9264f717cd49f375e5","dark":"https://mintcdn.com/deapi-f9ba3abb/gSOvhf4F2Dm8oAad/logo/deapi-dark.svg?fit=max\u0026auto=format\u0026n=gSOvhf4F2Dm8oAad\u0026q=85\u0026s=4f204c43a4a41d8f476b76d91ac5ee7c"},"favicon":"https://mintcdn.com/deapi-f9ba3abb/-BqpLinCKwOHWbhI/favicon.png?fit=max\u0026auto=format\u0026n=-BqpLinCKwOHWbhI\u0026q=85\u0026s=295488219f7cfd2b9a7007447e093121","api":{"openapi":["openapi.json","openapi-v2.json"]},"navbar":{"links":[{"href":"https://app.deapi.ai/dashboard","label":"Dashboard"},{"href":"https://status.deapi.ai/","label":"Status"},{"href":"https://github.com/deapi-ai","label":"GitHub"}],"primary":{"type":"button","label":"Get API Key","href":"https://app.deapi.ai/dashboard"}},"footer":{"socials":{"github":"https://github.com/deapi-ai","twitter":"https://x.com/deAPI_","discord":"https://discord.com/invite/UFfK5YRBsr","x":"https://x.com/deAPI_"}},"search":{"prompt":"Search deAPI docs..."},"seo":{"indexing":"all"},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"deapi-f9ba3abb","hasAudioNarration":false,"actualSubdomain":"deapi-f9ba3abb","customDomains":["docs.deapi.ai"],"gitSource":{"type":"github","owner":"deapi-ai","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad9fda4f7b413b0bdc2fd82","collectionId":"a0ac662e-4b69-4e6b-9f36-6f740d5d6d6e","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad9fda4f7b413b0bdc2fd82"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ad9fda4f7b413b0bdc2fd82","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"API v2 (Latest)","count":49},{"language":"default","tag":"API v1 (Deprecated)","count":42},{"language":"default","tag":"Guides","count":18},{"language":"default","tag":"Generation","count":14},{"language":"default","tag":"Analysis","count":12},{"language":"default","tag":"Videos","count":12},{"language":"default","tag":"Transformation","count":10},{"language":"default","tag":"Images","count":10},{"language":"default","tag":"Get started","count":8},{"language":"default","tag":"API Keys","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api/v1/generation/text-to-speech","slug":"/api/v1/generation/text-to-speech","pageMetadata":{"title":"Text-to-Speech (TTS)","openapi":"openapi.json POST /api/v1/client/txt2audio","description":"Endpoint for requesting text2audio inference","href":"/api/v1/generation/text-to-speech"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Endpoint for requesting text2audio inference\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Note,Warning}=_components;if(!Note)_missingMdxReference(`Note`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`API v1 is deprecated.`}),` This version is no longer being developed — new endpoints, parameters and models are added\\rto v2 only. Use the v2 endpoints to stay current: `,_jsx(_components.a,{href:`https://docs.deapi.ai/api/v2/overview`,children:`v2 API documentation`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`Text-to-Speech converts text into natural-sounding audio. The endpoint supports three TTS modes via the `,_jsx(_components.code,{children:`mode`}),` parameter:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`custom_voice`})}),` (default) — Use a preset voice from the model’s voice library. Requires the `,_jsx(_components.code,{children:`voice`}),` parameter.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`voice_clone`})}),` — Clone a voice from a short reference audio clip. Requires the `,_jsx(_components.code,{children:`ref_audio`}),` parameter (3–10 seconds, max 15 MB). Optionally provide `,_jsx(_components.code,{children:`ref_text`}),` with a transcript of the reference audio for improved accuracy.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`voice_design`})}),` — Create a new voice from a natural language description. Requires the `,_jsx(_components.code,{children:`instruct`}),` parameter (e.g. `,_jsx(_components.code,{children:`\"A warm female voice with a British accent\"`}),`).`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Prerequisite:`}),` To ensure a successful request, you must first consult the `,_jsx(_components.a,{href:`/api/v1/utilities/model-selection`,children:`Model Selection`}),` endpoint to identify a valid model `,_jsx(_components.code,{children:`slug`}),`, check specific `,_jsx(_components.strong,{children:`limits`}),` and `,_jsx(_components.strong,{children:`features`}),`, and verify available `,_jsx(_components.strong,{children:`languages`}),` and `,_jsx(_components.strong,{children:`voices`}),`.`]})}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Mode-specific required fields:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`custom_voice`}),` — `,_jsx(_components.code,{children:`voice`}),` is required.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`voice_clone`}),` — `,_jsx(_components.code,{children:`ref_audio`}),` is required. `,_jsx(_components.code,{children:`ref_text`}),` is optional but recommended.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`voice_design`}),` — `,_jsx(_components.code,{children:`instruct`}),` is required.`]}),`\n`]}),_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`mode`}),` is omitted, the API defaults to `,_jsx(_components.code,{children:`custom_voice`}),`.`]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Text-to-Speech (TTS)","openapi":"openapi.json POST /api/v1/client/txt2audio","description":"Endpoint for requesting text2audio inference","href":"/api/v1/generation/text-to-speech"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Client API"],"description":"Endpoint for requesting text2audio inference","operationId":"requestTxt2Audio","parameters":["6d404b2c-bc20-4670-942d-9a36e2a98397"],"requestBody":"6bb4387a-ae55-444e-8df7-cf3f23ab6b42","responses":{"200":"46a3e26a-3270-4832-8ed9-7d3af2e3830e","401":"13fee4df-24e3-4a54-b324-8fd8ae30c262","404":"67de588c-8be0-4040-bf61-9c333087816a","422":"e900e7c1-3f4c-4021-97b1-04112d15e809","429":"f82ba74c-ad0e-4946-abcf-f7b171112e86"},"security":["fedba70e-9a18-4e56-bc07-af2a09560402"],"method":"post","type":"path","servers":["0ba1be44-46d9-400d-b90c-bfe5580caa8a"],"path":"/api/v1/client/txt2audio","baseUrlOptions":["https://api.deapi.ai"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"6d404b2c-bc20-4670-942d-9a36e2a98397":{"name":"Accept","in":"header","required":true,"schema":{"type":"string","default":"application/json","enum":["application/json"],"isRequired":true,"uniqueKey":"","typeLabel":"enum\u003cstring>"}}},"requestBody":{"description":"Audio generation parameters. Supports three TTS modes: custom_voice (default, preset speakers), voice_clone (clone from reference audio), voice_design (create voice from description).","required":true,"content":{"multipart/form-data":{"schema":{"required":["text","model","lang","speed","format","sample_rate"],"properties":{"text":{"description":"Text to be converted to speech","type":"string","example":"A beautiful sunset over mountains","isRequired":true,"uniqueKey":"text","typeLabel":"string"},"model":{"description":"The model to use for speech generation. Available models can be retrieved via the GET /api/v1/client/models endpoint.","type":"string","example":"Kokoro","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"lang":{"description":"Language to be used during audio generation","type":"string","example":"en-us","isRequired":true,"uniqueKey":"lang","typeLabel":"string"},"speed":{"description":"Generated audio speech speed","type":"number","example":1,"isRequired":true,"uniqueKey":"speed","typeLabel":"number"},"format":{"description":"Audio output format","type":"string","example":"mp3","isRequired":true,"uniqueKey":"format","typeLabel":"string"},"sample_rate":{"description":"Sample rate of generated audio","type":"number","example":24000,"isRequired":true,"uniqueKey":"sample_rate","typeLabel":"number"},"mode":{"oneOf":[{"description":"TTS mode: custom_voice (default), voice_clone, or voice_design. Determines which fields are required.","type":"string","enum":["custom_voice","voice_clone","voice_design"],"example":"custom_voice","uniqueKey":"mode.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"TTS mode: custom_voice (default), voice_clone, or voice_design. Determines which fields are required.","type":"null","enum":["custom_voice","voice_clone","voice_design"],"example":"custom_voice","uniqueKey":"mode.oneOf.1","typeLabel":"null"}],"uniqueKey":"mode","typeLabel":"enum\u003cstring> | null"},"voice":{"oneOf":[{"description":"Name of the voice to be used. Required for custom_voice mode.","type":"string","example":"af_sky","uniqueKey":"voice.oneOf.0","typeLabel":"string"},{"description":"Name of the voice to be used. Required for custom_voice mode.","type":"null","example":"af_sky","uniqueKey":"voice.oneOf.1","typeLabel":"null"}],"uniqueKey":"voice","typeLabel":"string | null"},"ref_audio":{"oneOf":[{"description":"Reference audio file for voice cloning. Supported formats: mp3, ogg, m4a. Max 15MB. Duration must be between 3-10 seconds (model-specific limits may apply). Required for voice_clone mode.","type":"string","format":"binary","uniqueKey":"ref_audio.oneOf.0","typeLabel":"file"},{"description":"Reference audio file for voice cloning. Supported formats: mp3, ogg, m4a. Max 15MB. Duration must be between 3-10 seconds (model-specific limits may apply). Required for voice_clone mode.","type":"null","format":"binary","uniqueKey":"ref_audio.oneOf.1","typeLabel":"null"}],"uniqueKey":"ref_audio","typeLabel":"file | null"},"ref_text":{"oneOf":[{"description":"Optional transcript of the reference audio for improved voice cloning accuracy.","type":"string","uniqueKey":"ref_text.oneOf.0","typeLabel":"string"},{"description":"Optional transcript of the reference audio for improved voice cloning accuracy.","type":"null","uniqueKey":"ref_text.oneOf.1","typeLabel":"null"}],"uniqueKey":"ref_text","typeLabel":"string | null"},"instruct":{"oneOf":[{"description":"Natural language voice description for voice_design mode (e.g. \"A warm female voice with a British accent\"), or style/emotion control in custom_voice mode.","type":"string","uniqueKey":"instruct.oneOf.0","typeLabel":"string"},{"description":"Natural language voice description for voice_design mode (e.g. \"A warm female voice with a British accent\"), or style/emotion control in custom_voice mode.","type":"null","uniqueKey":"instruct.oneOf.1","typeLabel":"null"}],"uniqueKey":"instruct","typeLabel":"string | null"},"webhook_url":{"oneOf":[{"description":"Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. See [Webhook Documentation](/execution-modes-and-integrations/webhooks) for payload structure and authentication details.","type":"string","format":"uri","maxLength":2048,"example":"https://your-server.com/webhooks/deapi","uniqueKey":"webhook_url.oneOf.0","typeLabel":"string\u003curi>"},{"description":"Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. See [Webhook Documentation](/execution-modes-and-integrations/webhooks) for payload structure and authentication details.","type":"null","format":"uri","maxLength":2048,"example":"https://your-server.com/webhooks/deapi","uniqueKey":"webhook_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"webhook_url","typeLabel":"string\u003curi> | null"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"text":"A beautiful sunset over mountains","model":"Kokoro","lang":"en-us","speed":1,"format":"mp3","sample_rate":24000,"mode":"custom_voice","voice":"af_sky","ref_audio":"\u003cstring>","ref_text":"\u003cstring>","instruct":"\u003cstring>","webhook_url":"https://your-server.com/webhooks/deapi"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"46a3e26a-3270-4832-8ed9-7d3af2e3830e":{"description":"ID of the inference request.","content":{"application/json":{"schema":{"properties":{"data":{"description":"Information from success endpoint","properties":{"request_id":{"description":"Request Id","required":["request_id"],"type":"string","example":"c08a339c-73e5-4d67-a4d5-231302fbff9a","uniqueKey":"data.request_id","typeLabel":"string"}},"type":"object","uniqueKey":"data","typeLabel":"object"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"request_id":"c08a339c-73e5-4d67-a4d5-231302fbff9a"}}}},"exampleType":"generated"}},"exampleType":"generated"},"13fee4df-24e3-4a54-b324-8fd8ae30c262":{"description":"Unauthorized user.","content":{"application/json":{"schema":{"properties":{"data":{"description":"Information from success endpoint","type":"object","uniqueKey":"data","typeLabel":"object"},"message":{"description":"Error general message","type":"string","uniqueKey":"message","typeLabel":"string"},"errors":{"description":"Information about errors","type":"array","items":{"oneOf":[{}],"uniqueKey":"errors.items.[INDEX]","typeLabel":"any"},"uniqueKey":"errors","typeLabel":"any[]"},"statusCode":{"description":"Status code","type":"integer","uniqueKey":"statusCode","typeLabel":"integer"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{},"message":"\u003cstring>","errors":["\u003cunknown>"],"statusCode":123}}},"exampleType":"generated"}},"exampleType":"generated"},"67de588c-8be0-4040-bf61-9c333087816a":{"description":"Not found.","content":{"application/json":{"schema":{"properties":{"data":{"description":"Information from success endpoint","type":"object","uniqueKey":"data","typeLabel":"object"},"message":{"description":"Error general message","type":"string","uniqueKey":"message","typeLabel":"string"},"errors":{"description":"Information about errors","type":"array","items":{"oneOf":[{}],"uniqueKey":"errors.items.[INDEX]","typeLabel":"any"},"uniqueKey":"errors","typeLabel":"any[]"},"statusCode":{"description":"Status code","type":"integer","uniqueKey":"statusCode","typeLabel":"integer"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{},"message":"\u003cstring>","errors":["\u003cunknown>"],"statusCode":123}}},"exampleType":"generated"}},"exampleType":"generated"},"e900e7c1-3f4c-4021-97b1-04112d15e809":{"description":"Validation failed. Common errors include: model does not exist, model does not support the inference type for this endpoint, or invalid request parameters.","content":{"application/json":{"schema":{"properties":{"message":{"description":"General error message","type":"string","example":"The selected model does not support Text To Image.","uniqueKey":"message","typeLabel":"string"},"errors":{"description":"Detailed validation errors by field","type":"object","example":{"model":["The selected model does not support Text To Image."]},"uniqueKey":"errors","typeLabel":"object"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The selected model does not support Text To Image.","errors":{"model":["The selected model does not support Text To Image."]}}}},"exampleType":"generated"}},"exampleType":"generated"},"f82ba74c-ad0e-4946-abcf-f7b171112e86":{"description":"Rate limit exceeded. Check X-RateLimit-Type header to determine if minute (RPM) or daily (RPD) limit was hit.","headers":{"X-RateLimit-Limit":{"description":"Maximum requests allowed per minute (RPM)","schema":{"type":"integer","example":3}},"X-RateLimit-Remaining":{"description":"Remaining requests in current minute window","schema":{"type":"integer","example":0}},"X-RateLimit-Daily-Limit":{"description":"Maximum requests allowed per day (RPD)","schema":{"type":"integer","example":100}},"X-RateLimit-Daily-Remaining":{"description":"Remaining requests in current day window","schema":{"type":"integer","example":95}},"X-RateLimit-Type":{"description":"Type of rate limit exceeded: \"minute\" for RPM, \"daily\" for RPD","schema":{"type":"string","enum":["minute","daily"],"example":"minute"}},"Retry-After":{"description":"Seconds until rate limit resets (60 for minute, up to 86400 for daily)","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"description":"Rate limit exceeded response","properties":{"message":{"description":"Error message","type":"string","example":"Too Many Attempts.","uniqueKey":"message","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Too Many Attempts."}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"fedba70e-9a18-4e56-bc07-af2a09560402":{"bearerAuth":{"type":"http","bearerFormat":"JWT","scheme":"bearer","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"0ba1be44-46d9-400d-b90c-bfe5580caa8a":{"url":"https://api.deapi.ai","description":"Production API Server base URL"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","bearerFormat":"JWT","scheme":"bearer","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"deapi-f9ba3abb","siteName":"deAPI","title":"Text-to-Speech (TTS) - deAPI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-04T09:13:04.220Z","originalFileLocation":"api/v1/generation/text-to-speech.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Endpoint for requesting text2audio inference\">\u003cmeta data-mint-head name=\"application-name\" content=\"deAPI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Text-to-Speech (TTS) - deAPI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Endpoint for requesting text2audio inference\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"deAPI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.deapi.ai/api/v1/generation/text-to-speech\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://deapi-f9ba3abb.mintlify.app/_mintlify/api/og/v2?division=Generation\u0026amp;title=Text-to-Speech+%28TTS%29\u0026amp;description=Endpoint+for+requesting+text2audio+inference\u0026amp;theme=4c928ee8ac6977ca60ea2061\u0026amp;signature=caf0d15e114849ba594fcc0b16a0a30c7ae3eedceb850ace072b5a1e6435eb80\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Text-to-Speech (TTS) - deAPI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Endpoint for requesting text2audio inference\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://deapi-f9ba3abb.mintlify.app/_mintlify/api/og/v2?division=Generation\u0026amp;title=Text-to-Speech+%28TTS%29\u0026amp;description=Endpoint+for+requesting+text2audio+inference\u0026amp;theme=4c928ee8ac6977ca60ea2061\u0026amp;signature=caf0d15e114849ba594fcc0b16a0a30c7ae3eedceb850ace072b5a1e6435eb80\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/deapi-f9ba3abb/33g1Y_LWZKSlqOOT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"deAPI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FD9A00\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.deapi.ai/api/v1/generation/text-to-speech\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/v1/generation/text-to-speech.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.deapi.ai/#organization\",\"name\":\"deAPI\",\"url\":\"https://docs.deapi.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/deapi-f9ba3abb/gSOvhf4F2Dm8oAad/logo/deapi-light.svg?fit=max\u0026auto=format\u0026n=gSOvhf4F2Dm8oAad\u0026q=85\u0026s=e44c94d9c161aa9264f717cd49f375e5\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.deapi.ai#website\",\"name\":\"deAPI\",\"url\":\"https://docs.deapi.ai\",\"publisher\":{\"@id\":\"https://docs.deapi.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.deapi.ai/api/v1/generation/text-to-speech#webpage\",\"url\":\"https://docs.deapi.ai/api/v1/generation/text-to-speech\",\"name\":\"Text-to-Speech (TTS)\",\"description\":\"Endpoint for requesting text2audio inference\",\"dateModified\":\"2026-08-04T09:13:04.220Z\",\"isPartOf\":{\"@id\":\"https://docs.deapi.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.deapi.ai/api/v1/generation/text-to-speech#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.deapi.ai/api/v1/generation/text-to-speech#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Generation\",\"item\":\"https://docs.deapi.ai/api/v1/generation/text-to-image\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text-to-Speech (TTS)\",\"item\":\"https://docs.deapi.ai/api/v1/generation/text-to-speech\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.deapi.ai/api/v1/generation/text-to-speech#apireference\",\"headline\":\"Text-to-Speech (TTS)\",\"name\":\"Text-to-Speech (TTS)\",\"description\":\"Endpoint for requesting text2audio inference\",\"url\":\"https://docs.deapi.ai/api/v1/generation/text-to-speech\",\"mainEntityOfPage\":{\"@id\":\"https://docs.deapi.ai/api/v1/generation/text-to-speech#webpage\"},\"dateModified\":\"2026-08-04T09:13:04.220Z\",\"publisher\":{\"@id\":\"https://docs.deapi.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.deapi.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"deAPI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"deAPI","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"API v2 (Latest)","pages":[{"title":"API v2 (Latest)","href":"/api/v2/overview"}]},{"tab":"API v1 (Deprecated)","groups":[{"group":"Overview","pages":[{"title":"API Overview","href":"/api/v1/overview"},{"title":"Errors","href":"/api/v1/errors"}]},{"group":"Generation","pages":[{"title":"Text-to-Image","openapi":"openapi.json POST /api/v1/client/txt2img","href":"/api/v1/generation/text-to-image"},{"title":"Text-to-Image Price Calculation","openapi":"openapi.json POST /api/v1/client/txt2img/price-calculation","href":"/api/v1/generation/text-to-image-price"},{"title":"Text-to-Video","openapi":"openapi.json POST /api/v1/client/txt2video","href":"/api/v1/generation/text-to-video"},{"title":"Text-to-Video Price Calculation","openapi":"openapi.json POST /api/v1/client/txt2video/price-calculation","href":"/api/v1/generation/text-to-video-price"},{"title":"Image-to-Video","openapi":"openapi.json POST /api/v1/client/img2video","href":"/api/v1/generation/image-to-video"},{"title":"Image-to-Video Price Calculation","openapi":"openapi.json POST /api/v1/client/img2video/price-calculation","href":"/api/v1/generation/image-to-video-price"},{"title":"Audio-to-Video","openapi":"openapi.json POST /api/v1/client/aud2video","href":"/api/v1/generation/audio-to-video"},{"title":"Audio-to-Video Price Calculation","openapi":"openapi.json POST /api/v1/client/aud2video/price-calculation","description":"Endpoint for calculating price for audio2video inference","href":"/api/v1/generation/audio-to-video-price"},{"title":"Text-to-Speech (TTS)","openapi":"openapi.json POST /api/v1/client/txt2audio","href":"/api/v1/generation/text-to-speech"},{"title":"Text-to-Speech Price Calculation","openapi":"openapi.json POST /api/v1/client/txt2audio/price-calculation","description":"Endpoint for calculating price for text2audio inference. Either text or count_text must be provided.","href":"/api/v1/generation/text-to-speech-price"},{"title":"Text-to-Music","openapi":"openapi.json POST /api/v1/client/txt2music","href":"/api/v1/generation/text-to-music"},{"title":"Text-to-Music Price Calculation","openapi":"openapi.json POST /api/v1/client/txt2music/price-calculation","href":"/api/v1/generation/text-to-music-price"},{"title":"Text-to-Embedding","openapi":"openapi.json POST /api/v1/client/txt2embedding","href":"/api/v1/generation/text-to-embedding"},{"title":"Text-to-Embedding Price Calculation","openapi":"openapi.json POST /api/v1/client/txt2embedding/price-calculation","href":"/api/v1/generation/text-to-embedding-price"}]},{"group":"Analysis","pages":[{"title":"Image-to-Text (OCR)","openapi":"openapi.json POST /api/v1/client/img2txt","href":"/api/v1/analysis/image-to-text"},{"title":"Image-to-Text Price Calculation","openapi":"openapi.json POST /api/v1/client/img2txt/price-calculation","href":"/api/v1/analysis/image-to-text-price"},{"title":"Video-to-Text (Transcription)","openapi":"openapi.json POST /api/v1/client/vid2txt","href":"/api/v1/analysis/video-to-text"},{"title":"Video-to-Text Price Calculation","openapi":"openapi.json POST /api/v1/client/vid2txt/price-calculation","href":"/api/v1/analysis/video-to-text-price"},{"title":"Audio-to-Text (X Spaces Transcription)","openapi":"openapi.json POST /api/v1/client/aud2txt","href":"/api/v1/analysis/audio-to-text-spaces"},{"title":"Audio-to-Text (X Spaces) Price Calculation","openapi":"openapi.json POST /api/v1/client/aud2txt/price-calculation","href":"/api/v1/analysis/audio-to-text-spaces-price"},{"title":"Upload Video File (Video-to-Text)","openapi":"openapi.json POST /api/v1/client/videofile2txt","href":"/api/v1/analysis/upload-video-file"},{"title":"Upload Video File Price Calculation","openapi":"openapi.json POST /api/v1/client/videofile2txt/price-calculation","href":"/api/v1/analysis/upload-video-file-price"},{"title":"Upload Audio File (Audio-to-Text)","openapi":"openapi.json POST /api/v1/client/audiofile2txt","href":"/api/v1/analysis/upload-audio-file"},{"title":"Upload Audio File Price Calculation","openapi":"openapi.json POST /api/v1/client/audiofile2txt/price-calculation","href":"/api/v1/analysis/upload-audio-file-price"},{"title":"Transcribe (Unified Transcription)","openapi":"openapi.json POST /api/v1/client/transcribe","href":"/api/v1/analysis/transcribe"},{"title":"Transcribe Price Calculation","openapi":"openapi.json POST /api/v1/client/transcribe/price-calculation","href":"/api/v1/analysis/transcribe-price"}]},{"group":"Transformation","pages":[{"title":"Image-to-Image","openapi":"openapi.json POST /api/v1/client/img2img","href":"/api/v1/transformation/image-to-image"},{"title":"Image-to-Image Price Calculation","openapi":"openapi.json POST /api/v1/client/img2img/price-calculation","href":"/api/v1/transformation/image-to-image-price"},{"title":"Video Replace","openapi":"openapi.json POST /api/v1/client/videos/replace","href":"/api/v1/transformation/video-replace"},{"title":"Video Replace Price Calculation","openapi":"openapi.json POST /api/v1/client/videos/replace/price","href":"/api/v1/transformation/video-replace-price"},{"title":"Image Background Removal","openapi":"openapi.json POST /api/v1/client/img-rmbg","href":"/api/v1/transformation/background-removal"},{"title":"Image Background Removal Price Calculation","openapi":"openapi.json POST /api/v1/client/img-rmbg/price-calculation","href":"/api/v1/transformation/background-removal-price"},{"title":"Image Upscale","openapi":"openapi.json POST /api/v1/client/img-upscale","href":"/api/v1/transformation/image-upscale"},{"title":"Image Upscale Price Calculation","openapi":"openapi.json POST /api/v1/client/img-upscale/price-calculation","href":"/api/v1/transformation/image-upscale-price"},{"title":"Video Upscale","openapi":"openapi.json POST /api/v1/client/vid-upscale","href":"/api/v1/transformation/video-upscale"},{"title":"Video Upscale Price Calculation","openapi":"openapi.json POST /api/v1/client/vid-upscale/price-calculation","href":"/api/v1/transformation/video-upscale-price"}]},{"group":"Prompt Enhancement","pages":[{"title":"Prompt Enhancement (Removed)","href":"/api/v1/prompt-enhancement/overview"}]},{"group":"Utilities","pages":[{"title":"Check Balance","openapi":"openapi.json GET /api/v1/client/balance","href":"/api/v1/utilities/check-balance"},{"title":"Get Results","openapi":"openapi.json GET /api/v1/client/request-status/{request_id}","href":"/api/v1/utilities/get-results"},{"title":"Model Selection","openapi":"openapi.json GET /api/v1/client/models","href":"/api/v1/utilities/model-selection"}]}]}]},"title":"Text-to-Speech (TTS) - deAPI","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}