This endpoint only accepts application/json and application/msgpack.For best results, upload reference audio using the create model before using this one. This improves speech quality and reduces latency.To upload audio clips directly, without pre-uploading, serialize the request body with MessagePack as per the instructions.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
model
enum<string>
default:s2.1-pro
Specify which TTS model to use. Use s2.1-pro-free for the free developer tier. If omitted or set to an unrecognized value, the request falls back to s2.1-pro.
Available options:
s1,
s2-pro,
s2.1-pro,
s2.1-pro-free,
drama-3,
s3-pro
Body
application/jsonapplication/msgpack
Request body for text-to-speech synthesis. Supports single-speaker synthesis on all compatible TTS models. Multi-speaker dialogue synthesis is available with the S2 family (s2-pro, s2.1-pro, s2.1-pro-free) and drama-3, not s1.
Single Speaker
Provide either reference_id (string) pointing to a voice model, or references (array of ReferenceAudio) for zero-shot cloning.
Multiple Speakers (Dialogue — S2 family and drama-3)
For multi-speaker synthesis, provide:
reference_id: array of voice model IDs, e.g., ["speaker-0-id", "speaker-1-id"]
text: use speaker tags <|speaker:0|>, <|speaker:1|>, etc. to indicate speaker changes, e.g., "<|speaker:0|>Hello!<|speaker:1|>Hi there!"
Alternatively, for zero-shot multi-speaker:
references: 2D array where each inner array contains references for one speaker
reference_id: array of identifiers (can be arbitrary strings for zero-shot)
Example (Multi-Speaker with Model IDs)
{
"text": "<|speaker:0|>Good morning!<|speaker:1|>Good morning! How are you?<|speaker:0|>I'm great, thanks!",
"reference_id": ["model-id-alice", "model-id-bob"]
}
text
string
required
Text to convert to speech.
temperature
number
default:0.7
Controls expressiveness. Higher is more varied, lower is more consistent.
Rewrites numbers, dates, units and symbols as spoken words before synthesis, improving stability. Uses language when it is set and otherwise detects the language of each text chunk.
language
string | null
BCP-47 language tag of the text, for example en, es-MX or zh-CN. Case-insensitive, and _ is read as -. Used only by text normalization (how numbers, dates, units and symbols are spelled out before synthesis) and by word-timestamp alignment. It is not passed to the speech model and does not change the voice, accent or audio quality; a wrong tag only changes how those tokens are spelled out. Omit it, or send auto or an empty string, to detect the language per chunk. A tag without dedicated normalization rules skips normalization instead of failing. Without a region, Spanish follows Spain conventions; send es-MX for Mexican readings. When normalize is false it only affects word timestamps. For text that mixes languages, leave it unset.
Maximum string length: 35
Pattern: ^[A-Za-z0-9_-]*$
Example:
"en"
format
enum<string>
default:mp3
Output audio format.
Available options:
wav,
pcm,
mp3,
opus
sample_rate
integer | null
Audio sample rate in Hz. When null, uses the format's default (44100 Hz for most formats, 48000 Hz for opus).
mp3_bitrate
enum<integer>
default:128
MP3 bitrate in kbps. Only applies when format is mp3.
Available options:
64,
128,
192
opus_bitrate
enum<integer>
default:-1000
Opus bitrate in bps. -1000 for automatic. Only applies when format is opus.
Penalty for repeating audio patterns. Values above 1.0 reduce repetition.
min_chunk_length
integer
default:50
Minimum characters before splitting into a new chunk.
Required range: 0 <= x <= 100
condition_on_previous_chunks
boolean
default:true
Use previous audio as context for voice consistency.
early_stop_threshold
number
default:1
Early stopping threshold for batch processing.
Required range: 0 <= x <= 1
features
string[]
Optional request-scoped TTS feature flags forwarded verbatim to the inference backend. Use ["quality-guard"] to enable the quality guard for this synthesis request. Feature availability is determined by the inference backend.
pronunciation_dictionary
PronunciationDictionaryRef · object
Reference to a server-managed pronunciation dictionary. The server resolves contents via the platform pronunciation-dictionaries API and forwards the full merged dictionary to the inference engine, which performs the substitution.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Fish Audio","description":"Documentation for Fish Audio APIs, SDKs, models, voice cloning, real-time streaming, and self-hosting.","colors":{"primary":"#0e0e0e","light":"#9b90e8","dark":"#09090b"},"logo":{"light":"https://mintcdn.com/hanabiaiinc/amYp9Dj31LtlHliX/logo/light.png?fit=max\u0026auto=format\u0026n=amYp9Dj31LtlHliX\u0026q=85\u0026s=305973cd6a8d11dbf36d1ec682ee845e","dark":"https://mintcdn.com/hanabiaiinc/amYp9Dj31LtlHliX/logo/dark.png?fit=max\u0026auto=format\u0026n=amYp9Dj31LtlHliX\u0026q=85\u0026s=b79bd889db9ac1aae939834596e8a22f"},"favicon":"https://mintcdn.com/hanabiaiinc/-WxHANLOAmlTUwdM/favicon.svg?fit=max\u0026auto=format\u0026n=-WxHANLOAmlTUwdM\u0026q=85\u0026s=dc65d9f44bda0f5b8277c48dd9c979c3","navbar":{"links":[{"href":"https://discord.gg/dF9Db2Tt3Y","label":"Community"},{"href":"mailto:support@fish.audio","label":"Support"}],"primary":{"type":"button","label":"Sign Up","href":"https://fish.audio/app/developers/get-started/?utm_source=docs\u0026utm_medium=navbar\u0026utm_content=sign-up"}},"footer":{"socials":{"website":"https://fish.audio","github":"https://github.com/fishaudio","x":"https://x.com/fishaudio","linkedin":"https://www.linkedin.com/company/fish-audio","discord":"https://discord.gg/dF9Db2Tt3Y"},"links":[{"header":"About","items":[{"label":"Research","href":"https://openaudio.com/"},{"label":"Careers","href":"mailto:hr@fish.audio"},{"label":"Blog","href":"https://fish.audio/blog"}]},{"header":"Resources","items":[{"label":"API Status","href":"https://status.fish.audio"},{"label":"Open Source","href":"https://github.com/fishaudio"},{"label":"Changelog","href":"https://docs.fish.audio/developer-guide/getting-started/changelog"}]},{"header":"Legal","items":[{"label":"Privacy Policy","href":"https://fish.audio/privacy"},{"label":"Terms of Service","href":"https://fish.audio/terms"},{"label":"Report Abuse","href":"mailto:support@fish.audio?subject=%5BReport+Abuse%5D+MODEL+NAME\u0026amp;body=Please+provide+a+detailed+description+of+the+abuse+you+are+reporting."}]}]},"fonts":{"family":"Onest"},"integrations":{"amplitude":{"apiKey":"39daf30712f00da6ea5283bc21e7084e"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"interaction":{"drilldown":true},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hanabiaiinc","hasAudioNarration":false,"actualSubdomain":"hanabiaiinc","customDomains":["docs.fish.audio"],"gitSource":{"type":"github","owner":"fishaudio","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b02c17616b5d194c0133c7a","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"API Reference","count":98},{"language":"default","tag":"Agents API","count":57},{"language":"default","tag":"Agents","count":51},{"language":"default","tag":"Resources","count":41},{"language":"default","tag":"Overview","count":32},{"language":"default","tag":"REST API","count":26},{"language":"default","tag":"Core Features","count":15},{"language":"default","tag":"Tests","count":13},{"language":"default","tag":"Build","count":12},{"language":"default","tag":"Cookbook","count":12}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@fish.audio","showHelpButton":true}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"site-roles","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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"custom.css","content":"*{scrollbar-width:thin;scrollbar-color:rgba(120,120,120,0.4) transparent}::-webkit-scrollbar{width:6px;height:6px;background:transparent!important}::-webkit-scrollbar-thumb{background:rgba(120,120,120,0.5);border-radius:999px}::-webkit-scrollbar-thumb{opacity:0;transition:opacity 0.2s ease}:hover::-webkit-scrollbar-thumb,*:active::-webkit-scrollbar-thumb{opacity:1}img[src*=\"/images/\"]{background:transparent!important}.prompt-card{display:grid;cursor:pointer;outline:none}.prompt-card .card{transition:border-color 0.15s ease}.prompt-card:hover .card,.prompt-card:focus-visible .card{border-color:rgb(var(--primary))!important}.dark .prompt-card:hover .card,.dark .prompt-card:focus-visible .card{border-color:rgb(var(--primary-light))!important}.prompt-card-hint{position:absolute;top:1rem;right:1rem;padding:0.3rem 0.6rem;border-radius:9999px;font-size:0.75rem;line-height:1;color:rgb(var(--gray-500));background:rgba(120, 120, 120, 0.12);opacity:0;transition:opacity 0.15s ease;pointer-events:none}.prompt-card:hover .prompt-card-hint,.prompt-card:focus-visible .prompt-card-hint,.prompt-card[data-state=\"copied\"] .prompt-card-hint,.prompt-card[data-state=\"failed\"] .prompt-card-hint{opacity:1}.prompt-card[data-state=\"copied\"] .prompt-card-hint{color:rgb(var(--primary));background:rgb(var(--primary) / 0.12)}.dark .prompt-card[data-state=\"copied\"] .prompt-card-hint{color:rgb(var(--primary-light));background:rgb(var(--primary-light) / 0.16)}.tab-container:is(.console-api,:has(>.console-api)){margin:1.5rem 0;padding:0.875rem 1.25rem 1.125rem;border:1px solid rgb(var(--gray-200));border-radius:1rem}.dark .tab-container:is(.console-api,:has(>.console-api)){border-color:rgb(255 255 255 / 0.1)}.tab-container:is(.console-api,:has(>.console-api))>[data-component-part=\"tabs-list\"]{display:flex;width:fit-content;min-width:0;gap:2px;padding:3px;margin-bottom:0.875rem;border:0;border-radius:9px;background:rgb(120 120 120 / 0.12)}.tab-container:is(.console-api,:has(>.console-api))>[data-component-part=\"tabs-list\"] [data-component-part=\"tab-button\"]{padding:2px 10px;margin:0;border:0;border-radius:6px;font-size:0.8125rem;font-weight:500;line-height:1.375rem;color:rgb(var(--gray-600))}.tab-container:is(.console-api,:has(>.console-api))>[data-component-part=\"tabs-list\"] [data-component-part=\"tab-button\"]:hover{color:rgb(var(--gray-900))}.tab-container:is(.console-api,:has(>.console-api))>[data-component-part=\"tabs-list\"] [data-component-part=\"tab-button\"][data-active=\"true\"]{color:rgb(var(--primary));background:#fff;box-shadow:0 1px 2px rgb(0 0 0 / 0.1)}.dark .tab-container:is(.console-api,:has(>.console-api))>[data-component-part=\"tabs-list\"] [data-component-part=\"tab-button\"]{color:rgb(var(--gray-400))}.dark .tab-container:is(.console-api,:has(>.console-api))>[data-component-part=\"tabs-list\"] [data-component-part=\"tab-button\"]:hover{color:rgb(var(--gray-200))}.dark .tab-container:is(.console-api,:has(>.console-api))>[data-component-part=\"tabs-list\"] [data-component-part=\"tab-button\"][data-active=\"true\"]{color:rgb(var(--primary-light));background:rgb(255 255 255 / 0.12);box-shadow:none}.tab-container:is(.console-api,:has(>.console-api))>[data-component-part=\"tabs-list\"] .tab-icon{width:0.8125rem;height:0.8125rem;background-color:currentColor}.tab-container:is(.console-api,:has(>.console-api))>div>[data-component-part=\"tab-content\"]>:first-child{margin-top:0}.tab-container:is(.console-api,:has(>.console-api))>div>[data-component-part=\"tab-content\"]>:last-child{margin-bottom:0}"}]}
{"page":{"pagePath":"api-reference/endpoint/openapi-v1/text-to-speech","slug":"/api-reference/endpoint/openapi-v1/text-to-speech","pageMetadata":{"openapi":"post /v1/tts","title":"Text to Speech","description":"Convert text to speech","icon":"comment-dots","iconType":"solid","href":"/api-reference/endpoint/openapi-v1/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: \"Convert text to speech\"\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`,ul:`ul`,..._provideComponents(),...props.components},{Note,Warning}=_components;if(!Note)_missingMdxReference(`Note`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`This endpoint only accepts `,_jsx(_components.code,{children:`application/json`}),` and `,_jsx(_components.code,{children:`application/msgpack`}),`.`]}),_jsxs(_components.p,{children:[`For best results, upload reference audio using the `,_jsx(_components.a,{href:`/api-reference/endpoint/model/create-model`,children:`create model`}),` before using this one. This improves speech quality and reduces latency.`]}),_jsxs(_components.p,{children:[`To upload audio clips directly, without pre-uploading, serialize the request body with MessagePack as per the `,_jsx(_components.a,{href:`/features/text-to-speech#direct-api-messagepack`,children:`instructions`}),`.`]})]}),`\n`,_jsxs(Note,{children:[_jsx(_components.p,{children:`Audio formats supported:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`WAV / PCM`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Sample Rate: 8kHz, 16kHz, 24kHz, 32kHz, 44.1kHz`}),`\n`,_jsx(_components.li,{children:`Default Sample Rate: 44.1kHz`}),`\n`,_jsx(_components.li,{children:`16-bit, mono`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`MP3`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Sample Rate: 32kHz, 44.1kHz`}),`\n`,_jsx(_components.li,{children:`Default Sample Rate: 44.1kHz`}),`\n`,_jsx(_components.li,{children:`mono`}),`\n`,_jsx(_components.li,{children:`Bitrate: 64kbps, 128kbps (default), 192kbps`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Opus`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Sample Rate: 48kHz`}),`\n`,_jsx(_components.li,{children:`Default Sample Rate: 48kHz`}),`\n`,_jsx(_components.li,{children:`mono`}),`\n`,_jsx(_components.li,{children:`Bitrate: -1000 (auto), 24kbps, 32kbps (default), 48kbps, 64kbps`}),`\n`]}),`\n`]}),`\n`]})]})]})}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":{"openapi":"post /v1/tts","title":"Text to Speech","description":"Convert text to speech","icon":"comment-dots","iconType":"solid","href":"/api-reference/endpoint/openapi-v1/text-to-speech"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Text to Speech","security":["f544b280-cee8-4bfb-ac00-62962c69cfef"],"parameters":["01680f2c-881a-41df-a4f9-7a67a9fdb717"],"requestBody":"d5bdbe4a-f8d7-4193-8dfe-862227aecee5","responses":{"200":"25638148-6220-4533-bb56-2fc1834e902f","401":"6fe3fa01-b843-49bf-b285-6094b609d7b3","402":"8563ae62-2dc8-40db-84ca-fce284d75eb0","503":"2fcabe47-1e7e-462d-bfaf-285549f06539"},"tags":["OpenAPI v1"],"x-codeSamples":[{"lang":"bash","label":"Single Speaker","source":"curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer \u003ctoken>' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"Hello! Welcome to Fish Audio.\",\n \"reference_id\": \"model-id\",\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'"},{"lang":"bash","label":"Multi Speaker (S2 family only)","source":"curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer \u003ctoken>' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"\u003c|speaker:0|>Hello!\u003c|speaker:1|>Hi there!\",\n \"reference_id\": [\"speaker-a-id\", \"speaker-b-id\"],\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'"}],"method":"post","type":"path","servers":["ba0fc850-f42a-4c35-ac22-0b5da0c3ab4d"],"path":"/v1/tts","baseUrlOptions":["https://api.fish.audio"],"title":"Text to Speech","description":"Convert text to speech","codeSamples":[{"label":"Single Speaker","lang":"bash","source":"curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer \u003ctoken>' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"Hello! Welcome to Fish Audio.\",\n \"reference_id\": \"model-id\",\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'"},{"label":"Multi Speaker (S2 family only)","lang":"bash","source":"curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer \u003ctoken>' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"\u003c|speaker:0|>Hello!\u003c|speaker:1|>Hi there!\",\n \"reference_id\": [\"speaker-a-id\", \"speaker-b-id\"],\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"01680f2c-881a-41df-a4f9-7a67a9fdb717":{"in":"header","name":"model","description":"Specify which TTS model to use. Use `s2.1-pro-free` for the free developer tier. If omitted or set to an unrecognized value, the request falls back to `s2.1-pro`.","required":false,"schema":{"default":"s2.1-pro","enum":["s1","s2-pro","s2.1-pro","s2.1-pro-free","drama-3","s3-pro"],"title":"Model","type":"string","isRequired":false,"description":"Specify which TTS model to use. Use `s2.1-pro-free` for the free developer tier. If omitted or set to an unrecognized value, the request falls back to `s2.1-pro`.","uniqueKey":"","typeLabel":"enum\u003cstring>"},"deprecated":false}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Request body for text-to-speech synthesis. Supports single-speaker synthesis on all compatible TTS models. Multi-speaker dialogue synthesis is available with the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`) and `drama-3`, not `s1`.\n\n## Single Speaker\nProvide either `reference_id` (string) pointing to a voice model, or `references` (array of ReferenceAudio) for zero-shot cloning.\n\n## Multiple Speakers (Dialogue — S2 family and `drama-3`)\nFor multi-speaker synthesis, provide:\n- `reference_id`: array of voice model IDs, e.g., [\"speaker-0-id\", \"speaker-1-id\"]\n- `text`: use speaker tags `\u003c|speaker:0|>`, `\u003c|speaker:1|>`, etc. to indicate speaker changes, e.g., \"\u003c|speaker:0|>Hello!\u003c|speaker:1|>Hi there!\"\n\nAlternatively, for zero-shot multi-speaker:\n- `references`: 2D array where each inner array contains references for one speaker\n- `reference_id`: array of identifiers (can be arbitrary strings for zero-shot)\n\n## Example (Multi-Speaker with Model IDs)\n```json\n{\n \"text\": \"\u003c|speaker:0|>Good morning!\u003c|speaker:1|>Good morning! How are you?\u003c|speaker:0|>I'm great, thanks!\",\n \"reference_id\": [\"model-id-alice\", \"model-id-bob\"]\n}\n```","properties":{"text":{"description":"Text to convert to speech.","title":"Text","type":"string","isRequired":true,"uniqueKey":"text","typeLabel":"string"},"temperature":{"default":0.7,"description":"Controls expressiveness. Higher is more varied, lower is more consistent.","maximum":1,"minimum":0,"title":"Temperature","type":"number","uniqueKey":"temperature","typeLabel":"number"},"top_p":{"default":0.7,"description":"Controls diversity via nucleus sampling.","maximum":1,"minimum":0,"title":"Top P","type":"number","uniqueKey":"top_p","typeLabel":"number"},"references":{"oneOf":[{"type":"array","items":{"description":"A voice sample with its transcript, used for zero-shot voice cloning. The model will attempt to match the voice characteristics from the audio sample.","properties":{"audio":{"description":"Raw audio bytes of the voice sample. Supported formats: WAV, MP3, FLAC. For best results, use 10-30 seconds of clear speech with minimal background noise.","format":"binary","title":"Audio","type":"string","isRequired":true,"uniqueKey":"references.oneOf.0.items.[INDEX].audio","typeLabel":"file"},"text":{"description":"The exact transcript of what is spoken in the audio sample. Accuracy is important for voice cloning quality.","title":"Text","type":"string","isRequired":true,"uniqueKey":"references.oneOf.0.items.[INDEX].text","typeLabel":"string"}},"required":["audio","text"],"title":"ReferenceAudio","type":"object","uniqueKey":"references.oneOf.0.items.[INDEX]","typeLabel":"ReferenceAudio · object"},"title":"References","description":"Single speaker: array of reference audio samples","uniqueKey":"references.oneOf.0","typeLabel":"ReferenceAudio · object[]"},{"type":"array","items":{"items":{"description":"A voice sample with its transcript, used for zero-shot voice cloning. The model will attempt to match the voice characteristics from the audio sample.","properties":{"audio":{"description":"Raw audio bytes of the voice sample. Supported formats: WAV, MP3, FLAC. For best results, use 10-30 seconds of clear speech with minimal background noise.","format":"binary","title":"Audio","type":"string","isRequired":true,"uniqueKey":"references.oneOf.1.items.[INDEX].items.[INDEX].audio","typeLabel":"file"},"text":{"description":"The exact transcript of what is spoken in the audio sample. Accuracy is important for voice cloning quality.","title":"Text","type":"string","isRequired":true,"uniqueKey":"references.oneOf.1.items.[INDEX].items.[INDEX].text","typeLabel":"string"}},"required":["audio","text"],"title":"ReferenceAudio","type":"object","uniqueKey":"references.oneOf.1.items.[INDEX].items.[INDEX]","typeLabel":"ReferenceAudio · object"},"type":"array","uniqueKey":"references.oneOf.1.items.[INDEX]","typeLabel":"ReferenceAudio · object[]"},"title":"References","description":"Multiple speakers: array of arrays, where each inner array contains reference samples for one speaker","uniqueKey":"references.oneOf.1","typeLabel":"ReferenceAudio · object[][]"},{"type":"null","title":"References","description":"Inline voice references for zero-shot cloning. Requires MessagePack (not JSON). For single speaker, provide an array of ReferenceAudio objects. For multiple speakers, provide an array of arrays where each inner array contains references for one speaker. **Multi-speaker is available with the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`) and `drama-3`, not `s1`.** The speaker index corresponds to the index in reference_id array. Example for multi-speaker: [[{audio, text}], [{audio, text}, {audio, text}]] for 2 speakers where speaker 1 has 2 reference samples.","uniqueKey":"references.oneOf.2","typeLabel":"null"}],"uniqueKey":"references","typeLabel":"ReferenceAudio · object[] | ReferenceAudio · object[][] | null"},"reference_id":{"oneOf":[{"type":"string","title":"Reference Id","description":"Single speaker: voice model ID string","uniqueKey":"reference_id.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"reference_id.oneOf.1.items.[INDEX]","typeLabel":"string"},"title":"Reference Id","description":"Multiple speakers: array of voice model IDs, one per speaker","uniqueKey":"reference_id.oneOf.1","typeLabel":"string[]"},{"type":"null","title":"Reference Id","description":"Voice model ID(s) from Fish Audio library or your custom models. For single-speaker synthesis, provide a string. For multi-speaker synthesis (dialogue), provide an array of model IDs. **Multi-speaker is available with the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`) and `drama-3`, not `s1`.** When using multiple speakers, use speaker tags in your text like `\u003c|speaker:0|>` and `\u003c|speaker:1|>` to indicate speaker changes. Example: `\u003c|speaker:0|>Hello!\u003c|speaker:1|>Hi there!\u003c|speaker:0|>How are you?` with `reference_id: [\"speaker-a-id\", \"speaker-b-id\"]`.","uniqueKey":"reference_id.oneOf.2","typeLabel":"null"}],"uniqueKey":"reference_id","typeLabel":"string | string[] | null"},"prosody":{"oneOf":[{"type":"object","title":"ProsodyControl","description":"Speed and volume adjustments for the output.","properties":{"speed":{"default":1,"description":"Speaking rate multiplier. Valid range: 0.5 to 2.0. 1.0 = normal speed, 0.5 = half speed, 2.0 = double speed. Useful for adjusting pacing without regenerating audio.","title":"Speed","type":"number","uniqueKey":"prosody.oneOf.0.speed","typeLabel":"number"},"volume":{"default":0,"description":"Volume adjustment in decibels (dB). 0 = no change, positive values = louder, negative values = quieter.","title":"Volume","type":"number","uniqueKey":"prosody.oneOf.0.volume","typeLabel":"number"},"normalize_loudness":{"default":true,"description":"Normalize output loudness for more consistent perceived volume. Applies to the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`); on `s1` it is accepted but has no effect.","title":"Normalize Loudness","type":"boolean","uniqueKey":"prosody.oneOf.0.normalize_loudness","typeLabel":"boolean"}},"uniqueKey":"prosody.oneOf.0","typeLabel":"ProsodyControl · object"},{"type":"null","description":"Speed and volume adjustments for the output.","uniqueKey":"prosody.oneOf.1","typeLabel":"null"}],"uniqueKey":"prosody","typeLabel":"ProsodyControl · object | null"},"chunk_length":{"default":300,"description":"Text segment size for processing.","maximum":300,"minimum":100,"title":"Chunk Length","type":"integer","uniqueKey":"chunk_length","typeLabel":"integer"},"normalize":{"default":true,"description":"Rewrites numbers, dates, units and symbols as spoken words before synthesis, improving stability. Uses `language` when it is set and otherwise detects the language of each text chunk.","title":"Normalize","type":"boolean","uniqueKey":"normalize","typeLabel":"boolean"},"language":{"oneOf":[{"type":"string","title":"Language","description":"BCP-47 language tag of the text, for example `en`, `es-MX` or `zh-CN`. Case-insensitive, and `_` is read as `-`. Used only by text normalization (how numbers, dates, units and symbols are spelled out before synthesis) and by word-timestamp alignment. It is not passed to the speech model and does not change the voice, accent or audio quality; a wrong tag only changes how those tokens are spelled out. Omit it, or send `auto` or an empty string, to detect the language per chunk. A tag without dedicated normalization rules skips normalization instead of failing. Without a region, Spanish follows Spain conventions; send `es-MX` for Mexican readings. When `normalize` is false it only affects word timestamps. For text that mixes languages, leave it unset.","maxLength":35,"pattern":"^[A-Za-z0-9_-]*$","example":"en","uniqueKey":"language.oneOf.0","typeLabel":"string"},{"type":"null","title":"Language","description":"BCP-47 language tag of the text, for example `en`, `es-MX` or `zh-CN`. Case-insensitive, and `_` is read as `-`. Used only by text normalization (how numbers, dates, units and symbols are spelled out before synthesis) and by word-timestamp alignment. It is not passed to the speech model and does not change the voice, accent or audio quality; a wrong tag only changes how those tokens are spelled out. Omit it, or send `auto` or an empty string, to detect the language per chunk. A tag without dedicated normalization rules skips normalization instead of failing. Without a region, Spanish follows Spain conventions; send `es-MX` for Mexican readings. When `normalize` is false it only affects word timestamps. For text that mixes languages, leave it unset.","example":"en","uniqueKey":"language.oneOf.1","typeLabel":"null"}],"uniqueKey":"language","typeLabel":"string | null"},"format":{"default":"mp3","description":"Output audio format.","enum":["wav","pcm","mp3","opus"],"title":"Format","type":"string","uniqueKey":"format","typeLabel":"enum\u003cstring>"},"sample_rate":{"oneOf":[{"type":"integer","title":"Sample Rate","description":"Audio sample rate in Hz. When null, uses the format's default (44100 Hz for most formats, 48000 Hz for opus).","uniqueKey":"sample_rate.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Sample Rate","description":"Audio sample rate in Hz. When null, uses the format's default (44100 Hz for most formats, 48000 Hz for opus).","uniqueKey":"sample_rate.oneOf.1","typeLabel":"null"}],"uniqueKey":"sample_rate","typeLabel":"integer | null"},"mp3_bitrate":{"default":128,"description":"MP3 bitrate in kbps. Only applies when format is mp3.","enum":[64,128,192],"title":"Mp3 Bitrate","type":"integer","uniqueKey":"mp3_bitrate","typeLabel":"enum\u003cinteger>"},"opus_bitrate":{"default":-1000,"description":"Opus bitrate in bps. -1000 for automatic. Only applies when format is opus.","enum":[-1000,24000,32000,48000,64000],"title":"Opus Bitrate","type":"integer","uniqueKey":"opus_bitrate","typeLabel":"enum\u003cinteger>"},"latency":{"default":"normal","description":"Latency-quality trade-off. normal: best quality, balanced: reduced latency, low: lowest latency.","enum":["low","normal","balanced"],"title":"Latency","type":"string","uniqueKey":"latency","typeLabel":"enum\u003cstring>"},"max_new_tokens":{"default":1024,"description":"Maximum audio tokens to generate per text chunk.","title":"Max New Tokens","type":"integer","uniqueKey":"max_new_tokens","typeLabel":"integer"},"repetition_penalty":{"default":1.2,"description":"Penalty for repeating audio patterns. Values above 1.0 reduce repetition.","title":"Repetition Penalty","type":"number","uniqueKey":"repetition_penalty","typeLabel":"number"},"min_chunk_length":{"default":50,"description":"Minimum characters before splitting into a new chunk.","maximum":100,"minimum":0,"title":"Min Chunk Length","type":"integer","uniqueKey":"min_chunk_length","typeLabel":"integer"},"condition_on_previous_chunks":{"default":true,"description":"Use previous audio as context for voice consistency.","title":"Condition On Previous Chunks","type":"boolean","uniqueKey":"condition_on_previous_chunks","typeLabel":"boolean"},"early_stop_threshold":{"default":1,"description":"Early stopping threshold for batch processing.","maximum":1,"minimum":0,"title":"Early Stop Threshold","type":"number","uniqueKey":"early_stop_threshold","typeLabel":"number"},"features":{"default":[],"description":"Optional request-scoped TTS feature flags forwarded verbatim to the inference backend. Use [\"quality-guard\"] to enable the quality guard for this synthesis request. Feature availability is determined by the inference backend.","items":{"type":"string","uniqueKey":"features.items.[INDEX]","typeLabel":"string"},"title":"Features","type":"array","uniqueKey":"features","typeLabel":"string[]"},"pronunciation_dictionary":{"oneOf":[{"type":"array","items":{"additionalProperties":false,"description":"Reference to a server-managed pronunciation dictionary. The server resolves contents via the platform pronunciation-dictionaries API and forwards the full merged dictionary to the inference engine, which performs the substitution.","properties":{"id":{"description":"Dictionary identifier as registered on the platform.","pattern":"^[A-Za-z0-9_-]{1,128}$","title":"Id","type":"string","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.0.items.[INDEX].id","typeLabel":"string"},"version":{"description":"Immutable version identifier for the dictionary. Version is required — there is no implicit `latest`.","pattern":"^[A-Za-z0-9_-]{1,128}$","title":"Version","type":"string","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.0.items.[INDEX].version","typeLabel":"string"}},"required":["id","version"],"title":"PronunciationDictionaryRef","type":"object","uniqueKey":"pronunciation_dictionary.oneOf.0.items.[INDEX]","typeLabel":"PronunciationDictionaryRef · object"},"title":"Pronunciation Dictionary","description":"Reference form: list of pointers to platform pronunciation dictionaries. Each entry identifies a dictionary by `id` and `version`; the server resolves the contents from the platform service before forwarding them to the inference engine.","maxItems":3,"uniqueKey":"pronunciation_dictionary.oneOf.0","typeLabel":"PronunciationDictionaryRef · object[]"},{"type":"array","items":{"additionalProperties":false,"description":"Inline literal pronunciation dictionary. The server forwards the entries directly to the inference engine without contacting the platform.","properties":{"items":{"description":"Replacement entries for this dictionary. See the top-level `pronunciation_dictionary` field description for replacement semantics.","items":{"additionalProperties":false,"description":"A single key/value entry in a pronunciation dictionary. The inference engine replaces every occurrence of `key` in the request text with `value` during synthesis. With the default `type: \"phoneme\"` the value is spoken as a phonetic form; with `type: \"alias\"` it is substituted as plain text.","properties":{"key":{"description":"Source substring to match. Pure substring match — no tokenization, no regex. Overlapping matches resolve leftmost-longest. For CJK text include enough context to disambiguate. For `type: \"alias\"` the key must not start or end with whitespace and must not contain control characters, `\u003c`, `>`, `(`, `)`, `[` or `]`.","maxLength":256,"minLength":1,"title":"Key","type":"string","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX].key","typeLabel":"string"},"value":{"description":"Replacement for the key during synthesis. For `type: \"phoneme\"` this is a phonetic representation; dictionary authors should NOT include the `\u003c|phoneme_start|>` / `\u003c|phoneme_end|>` markers themselves, because the inference engine wraps the value with those markers internally so the body is treated as phonemes rather than orthographic text. For `type: \"alias\"` this is plain text substituted verbatim (then normalized with the rest of the request text) and must not contain `\u003c|` or `|>`. Requests whose key or value contain either phoneme marker are rejected.","maxLength":1024,"minLength":1,"title":"Value","type":"string","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX].value","typeLabel":"string"},"type":{"default":"phoneme","description":"How `value` replaces `key`. `phoneme` (default) speaks the value as a phonetic form. `alias` substitutes the literal text, which then goes through the same text normalization as the rest of the request. Omitted or `null` means `phoneme`, so existing dictionaries and clients keep their behaviour. Any other value is rejected. Usage is billed on the text actually synthesized, with alias replacements counted: an alias that expands a key is billed for the longer text, one that shortens it is billed for the shorter text; phoneme rules never change billing.","enum":["phoneme","alias"],"title":"Type","type":"string","uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"case_sensitive":{"default":false,"description":"When true the match is case-sensitive; when false ASCII case folding is applied.","title":"Case Sensitive","type":"boolean","uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX].case_sensitive","typeLabel":"boolean"}},"required":["key","value"],"title":"PronunciationItem","type":"object","uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX]","typeLabel":"PronunciationItem · object"},"maxItems":5000,"title":"Items","type":"array","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items","typeLabel":"PronunciationItem · object[]"}},"required":["items"],"title":"PronunciationDictionaryInline","type":"object","uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX]","typeLabel":"PronunciationDictionaryInline · object"},"title":"Pronunciation Dictionary","description":"Inline form: list of literal pronunciation dictionaries. Each dictionary carries an `items` array of `{key, value, type?, case_sensitive?}` entries.","maxItems":3,"uniqueKey":"pronunciation_dictionary.oneOf.1","typeLabel":"PronunciationDictionaryInline · object[]"},{"type":"null","title":"Pronunciation Dictionary","description":"Optional list of up to 3 pronunciation dictionaries to apply during synthesis. Provide either references to platform-managed dictionaries OR inline literal dictionaries (the two forms are mutually exclusive in a single request). The server resolves and merges the dictionaries, then forwards the full merged dictionary to the inference engine, which performs the substitution. Each entry sets `type` to `phoneme` (default: the value is spoken as a phonetic form) or `alias` (plain text replacement). Usage is billed on the text actually synthesized, with alias replacements counted: an alias that expands a key is billed for the longer text, one that shortens it is billed for the shorter text; phoneme rules never change billing. Matching is plain substring matching, leftmost-longest, and case-insensitive unless an entry sets `case_sensitive`. Missing or unresolvable references are silently dropped — the request still succeeds. Use `application/json` or `application/msgpack` content-type; nested arrays are not representable in `multipart/form-data`.","uniqueKey":"pronunciation_dictionary.oneOf.2","typeLabel":"null"}],"uniqueKey":"pronunciation_dictionary","typeLabel":"PronunciationDictionaryRef · object[] | PronunciationDictionaryInline · object[] | null"}},"required":["text"],"title":"TTSRequest","type":"object","uniqueKey":"","typeLabel":"TTSRequest · object"},"examples":{"Example":{"title":"Example","value":{"text":"\u003cstring>","temperature":0.7,"top_p":0.7,"references":[{"audio":"\u003cstring>","text":"\u003cstring>"}],"reference_id":"\u003cstring>","prosody":{"speed":1,"volume":0,"normalize_loudness":true},"chunk_length":300,"normalize":true,"language":"en","format":"mp3","sample_rate":123,"mp3_bitrate":128,"opus_bitrate":-1000,"latency":"normal","max_new_tokens":1024,"repetition_penalty":1.2,"min_chunk_length":50,"condition_on_previous_chunks":true,"early_stop_threshold":1,"features":[],"pronunciation_dictionary":[{"id":"\u003cstring>","version":"\u003cstring>"}]}}},"exampleType":"generated"},"application/msgpack":{"schema":{"description":"Request body for text-to-speech synthesis. Supports single-speaker synthesis on all compatible TTS models. Multi-speaker dialogue synthesis is available with the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`) and `drama-3`, not `s1`.\n\n## Single Speaker\nProvide either `reference_id` (string) pointing to a voice model, or `references` (array of ReferenceAudio) for zero-shot cloning.\n\n## Multiple Speakers (Dialogue — S2 family and `drama-3`)\nFor multi-speaker synthesis, provide:\n- `reference_id`: array of voice model IDs, e.g., [\"speaker-0-id\", \"speaker-1-id\"]\n- `text`: use speaker tags `\u003c|speaker:0|>`, `\u003c|speaker:1|>`, etc. to indicate speaker changes, e.g., \"\u003c|speaker:0|>Hello!\u003c|speaker:1|>Hi there!\"\n\nAlternatively, for zero-shot multi-speaker:\n- `references`: 2D array where each inner array contains references for one speaker\n- `reference_id`: array of identifiers (can be arbitrary strings for zero-shot)\n\n## Example (Multi-Speaker with Model IDs)\n```json\n{\n \"text\": \"\u003c|speaker:0|>Good morning!\u003c|speaker:1|>Good morning! How are you?\u003c|speaker:0|>I'm great, thanks!\",\n \"reference_id\": [\"model-id-alice\", \"model-id-bob\"]\n}\n```","properties":{"text":{"description":"Text to convert to speech.","title":"Text","type":"string","isRequired":true,"uniqueKey":"text","typeLabel":"string"},"temperature":{"default":0.7,"description":"Controls expressiveness. Higher is more varied, lower is more consistent.","maximum":1,"minimum":0,"title":"Temperature","type":"number","uniqueKey":"temperature","typeLabel":"number"},"top_p":{"default":0.7,"description":"Controls diversity via nucleus sampling.","maximum":1,"minimum":0,"title":"Top P","type":"number","uniqueKey":"top_p","typeLabel":"number"},"references":{"oneOf":[{"type":"array","items":{"description":"A voice sample with its transcript, used for zero-shot voice cloning. The model will attempt to match the voice characteristics from the audio sample.","properties":{"audio":{"description":"Raw audio bytes of the voice sample. Supported formats: WAV, MP3, FLAC. For best results, use 10-30 seconds of clear speech with minimal background noise.","format":"binary","title":"Audio","type":"string","isRequired":true,"uniqueKey":"references.oneOf.0.items.[INDEX].audio","typeLabel":"file"},"text":{"description":"The exact transcript of what is spoken in the audio sample. Accuracy is important for voice cloning quality.","title":"Text","type":"string","isRequired":true,"uniqueKey":"references.oneOf.0.items.[INDEX].text","typeLabel":"string"}},"required":["audio","text"],"title":"ReferenceAudio","type":"object","uniqueKey":"references.oneOf.0.items.[INDEX]","typeLabel":"ReferenceAudio · object"},"title":"References","description":"Single speaker: array of reference audio samples","uniqueKey":"references.oneOf.0","typeLabel":"ReferenceAudio · object[]"},{"type":"array","items":{"items":{"description":"A voice sample with its transcript, used for zero-shot voice cloning. The model will attempt to match the voice characteristics from the audio sample.","properties":{"audio":{"description":"Raw audio bytes of the voice sample. Supported formats: WAV, MP3, FLAC. For best results, use 10-30 seconds of clear speech with minimal background noise.","format":"binary","title":"Audio","type":"string","isRequired":true,"uniqueKey":"references.oneOf.1.items.[INDEX].items.[INDEX].audio","typeLabel":"file"},"text":{"description":"The exact transcript of what is spoken in the audio sample. Accuracy is important for voice cloning quality.","title":"Text","type":"string","isRequired":true,"uniqueKey":"references.oneOf.1.items.[INDEX].items.[INDEX].text","typeLabel":"string"}},"required":["audio","text"],"title":"ReferenceAudio","type":"object","uniqueKey":"references.oneOf.1.items.[INDEX].items.[INDEX]","typeLabel":"ReferenceAudio · object"},"type":"array","uniqueKey":"references.oneOf.1.items.[INDEX]","typeLabel":"ReferenceAudio · object[]"},"title":"References","description":"Multiple speakers: array of arrays, where each inner array contains reference samples for one speaker","uniqueKey":"references.oneOf.1","typeLabel":"ReferenceAudio · object[][]"},{"type":"null","title":"References","description":"Inline voice references for zero-shot cloning. Requires MessagePack (not JSON). For single speaker, provide an array of ReferenceAudio objects. For multiple speakers, provide an array of arrays where each inner array contains references for one speaker. **Multi-speaker is available with the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`) and `drama-3`, not `s1`.** The speaker index corresponds to the index in reference_id array. Example for multi-speaker: [[{audio, text}], [{audio, text}, {audio, text}]] for 2 speakers where speaker 1 has 2 reference samples.","uniqueKey":"references.oneOf.2","typeLabel":"null"}],"uniqueKey":"references","typeLabel":"ReferenceAudio · object[] | ReferenceAudio · object[][] | null"},"reference_id":{"oneOf":[{"type":"string","title":"Reference Id","description":"Single speaker: voice model ID string","uniqueKey":"reference_id.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"reference_id.oneOf.1.items.[INDEX]","typeLabel":"string"},"title":"Reference Id","description":"Multiple speakers: array of voice model IDs, one per speaker","uniqueKey":"reference_id.oneOf.1","typeLabel":"string[]"},{"type":"null","title":"Reference Id","description":"Voice model ID(s) from Fish Audio library or your custom models. For single-speaker synthesis, provide a string. For multi-speaker synthesis (dialogue), provide an array of model IDs. **Multi-speaker is available with the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`) and `drama-3`, not `s1`.** When using multiple speakers, use speaker tags in your text like `\u003c|speaker:0|>` and `\u003c|speaker:1|>` to indicate speaker changes. Example: `\u003c|speaker:0|>Hello!\u003c|speaker:1|>Hi there!\u003c|speaker:0|>How are you?` with `reference_id: [\"speaker-a-id\", \"speaker-b-id\"]`.","uniqueKey":"reference_id.oneOf.2","typeLabel":"null"}],"uniqueKey":"reference_id","typeLabel":"string | string[] | null"},"prosody":{"oneOf":[{"type":"object","title":"ProsodyControl","description":"Speed and volume adjustments for the output.","properties":{"speed":{"default":1,"description":"Speaking rate multiplier. Valid range: 0.5 to 2.0. 1.0 = normal speed, 0.5 = half speed, 2.0 = double speed. Useful for adjusting pacing without regenerating audio.","title":"Speed","type":"number","uniqueKey":"prosody.oneOf.0.speed","typeLabel":"number"},"volume":{"default":0,"description":"Volume adjustment in decibels (dB). 0 = no change, positive values = louder, negative values = quieter.","title":"Volume","type":"number","uniqueKey":"prosody.oneOf.0.volume","typeLabel":"number"},"normalize_loudness":{"default":true,"description":"Normalize output loudness for more consistent perceived volume. Applies to the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`); on `s1` it is accepted but has no effect.","title":"Normalize Loudness","type":"boolean","uniqueKey":"prosody.oneOf.0.normalize_loudness","typeLabel":"boolean"}},"uniqueKey":"prosody.oneOf.0","typeLabel":"ProsodyControl · object"},{"type":"null","description":"Speed and volume adjustments for the output.","uniqueKey":"prosody.oneOf.1","typeLabel":"null"}],"uniqueKey":"prosody","typeLabel":"ProsodyControl · object | null"},"chunk_length":{"default":300,"description":"Text segment size for processing.","maximum":300,"minimum":100,"title":"Chunk Length","type":"integer","uniqueKey":"chunk_length","typeLabel":"integer"},"normalize":{"default":true,"description":"Rewrites numbers, dates, units and symbols as spoken words before synthesis, improving stability. Uses `language` when it is set and otherwise detects the language of each text chunk.","title":"Normalize","type":"boolean","uniqueKey":"normalize","typeLabel":"boolean"},"language":{"oneOf":[{"type":"string","title":"Language","description":"BCP-47 language tag of the text, for example `en`, `es-MX` or `zh-CN`. Case-insensitive, and `_` is read as `-`. Used only by text normalization (how numbers, dates, units and symbols are spelled out before synthesis) and by word-timestamp alignment. It is not passed to the speech model and does not change the voice, accent or audio quality; a wrong tag only changes how those tokens are spelled out. Omit it, or send `auto` or an empty string, to detect the language per chunk. A tag without dedicated normalization rules skips normalization instead of failing. Without a region, Spanish follows Spain conventions; send `es-MX` for Mexican readings. When `normalize` is false it only affects word timestamps. For text that mixes languages, leave it unset.","maxLength":35,"pattern":"^[A-Za-z0-9_-]*$","example":"en","uniqueKey":"language.oneOf.0","typeLabel":"string"},{"type":"null","title":"Language","description":"BCP-47 language tag of the text, for example `en`, `es-MX` or `zh-CN`. Case-insensitive, and `_` is read as `-`. Used only by text normalization (how numbers, dates, units and symbols are spelled out before synthesis) and by word-timestamp alignment. It is not passed to the speech model and does not change the voice, accent or audio quality; a wrong tag only changes how those tokens are spelled out. Omit it, or send `auto` or an empty string, to detect the language per chunk. A tag without dedicated normalization rules skips normalization instead of failing. Without a region, Spanish follows Spain conventions; send `es-MX` for Mexican readings. When `normalize` is false it only affects word timestamps. For text that mixes languages, leave it unset.","example":"en","uniqueKey":"language.oneOf.1","typeLabel":"null"}],"uniqueKey":"language","typeLabel":"string | null"},"format":{"default":"mp3","description":"Output audio format.","enum":["wav","pcm","mp3","opus"],"title":"Format","type":"string","uniqueKey":"format","typeLabel":"enum\u003cstring>"},"sample_rate":{"oneOf":[{"type":"integer","title":"Sample Rate","description":"Audio sample rate in Hz. When null, uses the format's default (44100 Hz for most formats, 48000 Hz for opus).","uniqueKey":"sample_rate.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Sample Rate","description":"Audio sample rate in Hz. When null, uses the format's default (44100 Hz for most formats, 48000 Hz for opus).","uniqueKey":"sample_rate.oneOf.1","typeLabel":"null"}],"uniqueKey":"sample_rate","typeLabel":"integer | null"},"mp3_bitrate":{"default":128,"description":"MP3 bitrate in kbps. Only applies when format is mp3.","enum":[64,128,192],"title":"Mp3 Bitrate","type":"integer","uniqueKey":"mp3_bitrate","typeLabel":"enum\u003cinteger>"},"opus_bitrate":{"default":-1000,"description":"Opus bitrate in bps. -1000 for automatic. Only applies when format is opus.","enum":[-1000,24000,32000,48000,64000],"title":"Opus Bitrate","type":"integer","uniqueKey":"opus_bitrate","typeLabel":"enum\u003cinteger>"},"latency":{"default":"normal","description":"Latency-quality trade-off. normal: best quality, balanced: reduced latency, low: lowest latency.","enum":["low","normal","balanced"],"title":"Latency","type":"string","uniqueKey":"latency","typeLabel":"enum\u003cstring>"},"max_new_tokens":{"default":1024,"description":"Maximum audio tokens to generate per text chunk.","title":"Max New Tokens","type":"integer","uniqueKey":"max_new_tokens","typeLabel":"integer"},"repetition_penalty":{"default":1.2,"description":"Penalty for repeating audio patterns. Values above 1.0 reduce repetition.","title":"Repetition Penalty","type":"number","uniqueKey":"repetition_penalty","typeLabel":"number"},"min_chunk_length":{"default":50,"description":"Minimum characters before splitting into a new chunk.","maximum":100,"minimum":0,"title":"Min Chunk Length","type":"integer","uniqueKey":"min_chunk_length","typeLabel":"integer"},"condition_on_previous_chunks":{"default":true,"description":"Use previous audio as context for voice consistency.","title":"Condition On Previous Chunks","type":"boolean","uniqueKey":"condition_on_previous_chunks","typeLabel":"boolean"},"early_stop_threshold":{"default":1,"description":"Early stopping threshold for batch processing.","maximum":1,"minimum":0,"title":"Early Stop Threshold","type":"number","uniqueKey":"early_stop_threshold","typeLabel":"number"},"features":{"default":[],"description":"Optional request-scoped TTS feature flags forwarded verbatim to the inference backend. Use [\"quality-guard\"] to enable the quality guard for this synthesis request. Feature availability is determined by the inference backend.","items":{"type":"string","uniqueKey":"features.items.[INDEX]","typeLabel":"string"},"title":"Features","type":"array","uniqueKey":"features","typeLabel":"string[]"},"pronunciation_dictionary":{"oneOf":[{"type":"array","items":{"additionalProperties":false,"description":"Reference to a server-managed pronunciation dictionary. The server resolves contents via the platform pronunciation-dictionaries API and forwards the full merged dictionary to the inference engine, which performs the substitution.","properties":{"id":{"description":"Dictionary identifier as registered on the platform.","pattern":"^[A-Za-z0-9_-]{1,128}$","title":"Id","type":"string","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.0.items.[INDEX].id","typeLabel":"string"},"version":{"description":"Immutable version identifier for the dictionary. Version is required — there is no implicit `latest`.","pattern":"^[A-Za-z0-9_-]{1,128}$","title":"Version","type":"string","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.0.items.[INDEX].version","typeLabel":"string"}},"required":["id","version"],"title":"PronunciationDictionaryRef","type":"object","uniqueKey":"pronunciation_dictionary.oneOf.0.items.[INDEX]","typeLabel":"PronunciationDictionaryRef · object"},"title":"Pronunciation Dictionary","description":"Reference form: list of pointers to platform pronunciation dictionaries. Each entry identifies a dictionary by `id` and `version`; the server resolves the contents from the platform service before forwarding them to the inference engine.","maxItems":3,"uniqueKey":"pronunciation_dictionary.oneOf.0","typeLabel":"PronunciationDictionaryRef · object[]"},{"type":"array","items":{"additionalProperties":false,"description":"Inline literal pronunciation dictionary. The server forwards the entries directly to the inference engine without contacting the platform.","properties":{"items":{"description":"Replacement entries for this dictionary. See the top-level `pronunciation_dictionary` field description for replacement semantics.","items":{"additionalProperties":false,"description":"A single key/value entry in a pronunciation dictionary. The inference engine replaces every occurrence of `key` in the request text with `value` during synthesis. With the default `type: \"phoneme\"` the value is spoken as a phonetic form; with `type: \"alias\"` it is substituted as plain text.","properties":{"key":{"description":"Source substring to match. Pure substring match — no tokenization, no regex. Overlapping matches resolve leftmost-longest. For CJK text include enough context to disambiguate. For `type: \"alias\"` the key must not start or end with whitespace and must not contain control characters, `\u003c`, `>`, `(`, `)`, `[` or `]`.","maxLength":256,"minLength":1,"title":"Key","type":"string","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX].key","typeLabel":"string"},"value":{"description":"Replacement for the key during synthesis. For `type: \"phoneme\"` this is a phonetic representation; dictionary authors should NOT include the `\u003c|phoneme_start|>` / `\u003c|phoneme_end|>` markers themselves, because the inference engine wraps the value with those markers internally so the body is treated as phonemes rather than orthographic text. For `type: \"alias\"` this is plain text substituted verbatim (then normalized with the rest of the request text) and must not contain `\u003c|` or `|>`. Requests whose key or value contain either phoneme marker are rejected.","maxLength":1024,"minLength":1,"title":"Value","type":"string","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX].value","typeLabel":"string"},"type":{"default":"phoneme","description":"How `value` replaces `key`. `phoneme` (default) speaks the value as a phonetic form. `alias` substitutes the literal text, which then goes through the same text normalization as the rest of the request. Omitted or `null` means `phoneme`, so existing dictionaries and clients keep their behaviour. Any other value is rejected. Usage is billed on the text actually synthesized, with alias replacements counted: an alias that expands a key is billed for the longer text, one that shortens it is billed for the shorter text; phoneme rules never change billing.","enum":["phoneme","alias"],"title":"Type","type":"string","uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"case_sensitive":{"default":false,"description":"When true the match is case-sensitive; when false ASCII case folding is applied.","title":"Case Sensitive","type":"boolean","uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX].case_sensitive","typeLabel":"boolean"}},"required":["key","value"],"title":"PronunciationItem","type":"object","uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items.items.[INDEX]","typeLabel":"PronunciationItem · object"},"maxItems":5000,"title":"Items","type":"array","isRequired":true,"uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX].\\items","typeLabel":"PronunciationItem · object[]"}},"required":["items"],"title":"PronunciationDictionaryInline","type":"object","uniqueKey":"pronunciation_dictionary.oneOf.1.items.[INDEX]","typeLabel":"PronunciationDictionaryInline · object"},"title":"Pronunciation Dictionary","description":"Inline form: list of literal pronunciation dictionaries. Each dictionary carries an `items` array of `{key, value, type?, case_sensitive?}` entries.","maxItems":3,"uniqueKey":"pronunciation_dictionary.oneOf.1","typeLabel":"PronunciationDictionaryInline · object[]"},{"type":"null","title":"Pronunciation Dictionary","description":"Optional list of up to 3 pronunciation dictionaries to apply during synthesis. Provide either references to platform-managed dictionaries OR inline literal dictionaries (the two forms are mutually exclusive in a single request). The server resolves and merges the dictionaries, then forwards the full merged dictionary to the inference engine, which performs the substitution. Each entry sets `type` to `phoneme` (default: the value is spoken as a phonetic form) or `alias` (plain text replacement). Usage is billed on the text actually synthesized, with alias replacements counted: an alias that expands a key is billed for the longer text, one that shortens it is billed for the shorter text; phoneme rules never change billing. Matching is plain substring matching, leftmost-longest, and case-insensitive unless an entry sets `case_sensitive`. Missing or unresolvable references are silently dropped — the request still succeeds. Use `application/json` or `application/msgpack` content-type; nested arrays are not representable in `multipart/form-data`.","uniqueKey":"pronunciation_dictionary.oneOf.2","typeLabel":"null"}],"uniqueKey":"pronunciation_dictionary","typeLabel":"PronunciationDictionaryRef · object[] | PronunciationDictionaryInline · object[] | null"}},"required":["text"],"title":"TTSRequest","type":"object","uniqueKey":"","typeLabel":"TTSRequest · object"},"examples":{"Example":{"title":"Example","value":{"text":"\u003cstring>","temperature":0.7,"top_p":0.7,"references":[{"audio":"\u003cstring>","text":"\u003cstring>"}],"reference_id":"\u003cstring>","prosody":{"speed":1,"volume":0,"normalize_loudness":true},"chunk_length":300,"normalize":true,"language":"en","format":"mp3","sample_rate":123,"mp3_bitrate":128,"opus_bitrate":-1000,"latency":"normal","max_new_tokens":1024,"repetition_penalty":1.2,"min_chunk_length":50,"condition_on_previous_chunks":true,"early_stop_threshold":1,"features":[],"pronunciation_dictionary":[{"id":"\u003cstring>","version":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"25638148-6220-4533-bb56-2fc1834e902f":{"description":"Request fulfilled, document follows","headers":{"Transfer-Encoding":{"schema":{"type":"string"},"description":"chunked"}},"content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"6fe3fa01-b843-49bf-b285-6094b609d7b3":{"description":"No permission -- see authorization schemes","headers":{},"content":{"application/json":{"schema":{"properties":{"status":{"title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"message":{"title":"Message","type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"reason":{"oneOf":[{"type":"string","title":"Reason","uniqueKey":"reason.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reason","uniqueKey":"reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"reason","typeLabel":"string | null"}},"required":["status","message"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":123,"message":"\u003cstring>","reason":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"8563ae62-2dc8-40db-84ca-fce284d75eb0":{"description":"No payment -- see charging schemes","headers":{},"content":{"application/json":{"schema":{"properties":{"status":{"title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"message":{"title":"Message","type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"reason":{"oneOf":[{"type":"string","title":"Reason","uniqueKey":"reason.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reason","uniqueKey":"reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"reason","typeLabel":"string | null"}},"required":["status","message"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":123,"message":"\u003cstring>","reason":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"2fcabe47-1e7e-462d-bfaf-285549f06539":{"description":"The server cannot process the request due to a high load","headers":{},"content":{"application/json":{"schema":{"properties":{"status":{"title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"message":{"title":"Message","type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"reason":{"oneOf":[{"type":"string","title":"Reason","uniqueKey":"reason.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reason","uniqueKey":"reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"reason","typeLabel":"string | null"}},"required":["status","message"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":123,"message":"\u003cstring>","reason":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"f544b280-cee8-4bfb-ac00-62962c69cfef":{"BearerAuth":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"ba0fc850-f42a-4c35-ac22-0b5da0c3ab4d":{"description":"Fish Audio API","url":"https://api.fish.audio"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","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":"api-reference/openapi.json"},"subdomain":"hanabiaiinc","siteName":"Fish Audio","title":"Text to Speech - Fish Audio","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-08T23:26:18.672Z","originalFileLocation":"api-reference/endpoint/openapi-v1/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=\"Convert text to speech\">\u003cmeta data-mint-head name=\"application-name\" content=\"Fish Audio\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hanabiaiinc/rHJNuwD9FcQhvMwX/_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/hanabiaiinc/rHJNuwD9FcQhvMwX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hanabiaiinc/rHJNuwD9FcQhvMwX/_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/hanabiaiinc/rHJNuwD9FcQhvMwX/_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/hanabiaiinc/rHJNuwD9FcQhvMwX/_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/hanabiaiinc/rHJNuwD9FcQhvMwX/_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/hanabiaiinc/rHJNuwD9FcQhvMwX/_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/hanabiaiinc/rHJNuwD9FcQhvMwX/_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/hanabiaiinc/rHJNuwD9FcQhvMwX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Text to Speech - Fish Audio\">\u003cmeta data-mint-head property=\"og:description\" content=\"Convert text to speech\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Fish Audio\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hanabiaiinc.mintlify.site/_mintlify/api/og/v2?division=TTS+%28v1%29\u0026amp;title=Text+to+Speech\u0026amp;description=Convert+text+to+speech\u0026amp;theme=61fce384ffd542cc270fb190\u0026amp;signature=a6cdf88ec283bff1107559656694fed260287b7938678b3b24f6f5c709aa77df\">\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 - Fish Audio\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Convert text to speech\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hanabiaiinc.mintlify.site/_mintlify/api/og/v2?division=TTS+%28v1%29\u0026amp;title=Text+to+Speech\u0026amp;description=Convert+text+to+speech\u0026amp;theme=61fce384ffd542cc270fb190\u0026amp;signature=a6cdf88ec283bff1107559656694fed260287b7938678b3b24f6f5c709aa77df\">\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/hanabiaiinc/rHJNuwD9FcQhvMwX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Fish Audio\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0e0e0e\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/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-reference/endpoint/openapi-v1/text-to-speech.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.fish.audio/#organization\",\"name\":\"Fish Audio\",\"url\":\"https://docs.fish.audio\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hanabiaiinc/amYp9Dj31LtlHliX/logo/light.png?fit=max\u0026auto=format\u0026n=amYp9Dj31LtlHliX\u0026q=85\u0026s=305973cd6a8d11dbf36d1ec682ee845e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.fish.audio#website\",\"name\":\"Fish Audio\",\"url\":\"https://docs.fish.audio\",\"publisher\":{\"@id\":\"https://docs.fish.audio/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech#webpage\",\"url\":\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech\",\"name\":\"Text to Speech\",\"description\":\"Convert text to speech\",\"dateModified\":\"2026-06-08T23:26:18.672Z\",\"isPartOf\":{\"@id\":\"https://docs.fish.audio#website\"},\"breadcrumb\":{\"@id\":\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"REST API\",\"item\":\"https://docs.fish.audio/api-reference/endpoint/wallet/get-api-credit\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text to Speech\",\"item\":\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech#apireference\",\"headline\":\"Text to Speech\",\"name\":\"Text to Speech\",\"description\":\"Convert text to speech\",\"url\":\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech\",\"mainEntityOfPage\":{\"@id\":\"https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech#webpage\"},\"dateModified\":\"2026-06-08T23:26:18.672Z\",\"publisher\":{\"@id\":\"https://docs.fish.audio/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.fish.audio#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Fish Audio\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Fish Audio\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/openapi-v1/text-to-speech.md","siteName":"Fish Audio","nav":{"global":null,"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/overview/capabilities"}]},{"tab":"Agents","pages":[{"title":"Agents","href":"/agents/overview"}]},{"tab":"Resources","pages":[{"title":"Resources","href":"/developer-guide/sdk-guide/quickstart"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"Introduction","icon":"book","iconType":"solid","href":"/api-reference/introduction"},{"title":"Tracing \u0026 Performance Analysis","icon":"chart-line","iconType":"solid","href":"/api-reference/observability"},{"title":"Errors","icon":"triangle-exclamation","href":"/api-reference/errors"}]},{"group":"REST API","pages":[{"group":"Wallet","icon":"wallet","pages":[{"openapi":"get /wallet/{user_id}/api-credit","title":"Get API Credit","icon":"wallet","iconType":"solid","href":"/api-reference/endpoint/wallet/get-api-credit"},{"openapi":"get /wallet/{user_id}/package","title":"Get User Package","icon":"star","iconType":"solid","href":"/api-reference/endpoint/wallet/get-user-package"}]},{"group":"API Keys","icon":"key","pages":[{"openapi":"post /apikey/revoke","title":"Revoke Exposed API Keys","icon":"key","iconType":"solid","href":"/api-reference/endpoint/apikey/revoke-api-keys"}]},{"group":"Voice Models","icon":"cube","pages":[{"openapi":"get /model","title":"List Models","icon":"list","iconType":"solid","href":"/api-reference/endpoint/model/list-models"},{"openapi":"post /model","title":"Create Model","icon":"circle-plus","iconType":"solid","href":"/api-reference/endpoint/model/create-model"},{"openapi":"get /model/{id}","title":"Get Model","icon":"circle-info","iconType":"solid","href":"/api-reference/endpoint/model/get-model"},{"openapi":"delete /model/{id}","title":"Delete Model","icon":"trash","iconType":"solid","href":"/api-reference/endpoint/model/delete-model"},{"openapi":"patch /model/{id}","title":"Update Model","icon":"pen-to-square","iconType":"solid","href":"/api-reference/endpoint/model/update-model"}]},{"group":"Pronunciation Dictionaries","icon":"book-open","pages":[{"openapi":"get /v1/pronunciation-dictionaries","title":"List Dictionaries","icon":"list","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/list-dictionaries"},{"openapi":"post /v1/pronunciation-dictionaries","title":"Create Dictionary","icon":"circle-plus","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/create-dictionary"},{"openapi":"get /v1/pronunciation-dictionaries/{dictionary_id}","title":"Get Dictionary","icon":"book-open","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/get-dictionary"},{"openapi":"patch /v1/pronunciation-dictionaries/{dictionary_id}","title":"Update Dictionary","icon":"pen-to-square","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/update-dictionary"},{"openapi":"delete /v1/pronunciation-dictionaries/{dictionary_id}","title":"Delete Dictionary","icon":"trash","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/delete-dictionary"},{"openapi":"get /v1/pronunciation-dictionaries/{dictionary_id}/versions","title":"List Versions","icon":"clock-rotate-left","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/list-versions"},{"openapi":"post /v1/pronunciation-dictionaries/{dictionary_id}/versions","title":"Publish Version","icon":"upload","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/create-version"},{"openapi":"get /v1/pronunciation-dictionaries/{dictionary_id}/versions/{version_id}","title":"Get Version","icon":"file-lines","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/get-version"},{"openapi":"get /v1/pronunciation-dictionaries/{dictionary_id}/versions/{version_id}/compare","title":"Compare Versions","icon":"code-compare","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/compare-versions"},{"openapi":"delete /v1/pronunciation-dictionaries/{dictionary_id}/versions/{version_id}","title":"Delete Version","description":"Delete a published version of a pronunciation dictionary","icon":"trash-can","iconType":"solid","href":"/api-reference/endpoint/pronunciation-dictionary/delete-version"}]},{"group":"TTS (v1)","icon":"code","pages":[{"openapi":"post /v1/tts","title":"Text to Speech","icon":"comment-dots","iconType":"solid","href":"/api-reference/endpoint/openapi-v1/text-to-speech"},{"openapi":"post /v1/tts/stream/with-timestamp","title":"Text to Speech Stream with Timestamps","description":"Stream generated speech with timestamp alignment snapshots","icon":"waveform-lines","iconType":"solid","href":"/api-reference/endpoint/openapi-v1/text-to-speech-stream-with-timestamps"},{"asyncapi":"api-reference/asyncapi.yml ttsLive","title":"WebSocket TTS Streaming","icon":"webhook","iconType":"solid","href":"/api-reference/endpoint/websocket/tts-live"},{"asyncapi":"api-reference/asyncapi.yml ttsLiveWithTimestamps","title":"WebSocket TTS with Timestamps","icon":"webhook","iconType":"solid","href":"/api-reference/endpoint/openapi-v1/text-to-speech-live-with-timestamps"},{"openapi":"post /v1/audio/infill","title":"Audio Infill","icon":"pen-to-square","iconType":"solid","href":"/api-reference/endpoint/openapi-v1/audio-infill"}]},{"group":"Duplex (v1)","icon":"waveform-lines","hidden":true,"pages":[{"asyncapi":"api-reference/duplex-api-asyncapi.yml duplexConverse","title":"Duplex API Converse","icon":"waveform-lines","href":"/api-reference/endpoint/websocket/duplex-api-converse"}]},{"group":"ASR (v1)","icon":"microphone","pages":[{"openapi":"post /v1/asr","title":"Speech to Text","icon":"microphone","iconType":"solid","href":"/api-reference/endpoint/openapi-v1/speech-to-text"},{"asyncapi":"api-reference/asyncapi-asr-realtime.yml asrRealtime","title":"WebSocket Realtime Speech to Text","icon":"webhook","iconType":"solid","tag":"Preview","href":"/api-reference/endpoint/websocket/asr-realtime"}]},{"group":"Voice Design","icon":"wand-magic-sparkles","pages":[{"openapi":"post /v1/voice-design","title":"Voice Design","icon":"wand-magic-sparkles","iconType":"solid","href":"/api-reference/endpoint/openapi-v1/voice-design"}]}]},{"group":"Agents API","pages":[{"title":"Voice Agents API Errors","sidebarTitle":"Agents API Errors","icon":"triangle-exclamation","href":"/api-reference/agent-errors"},{"group":"Agents","icon":"robot","pages":[{"openapi":"get /v1/agent/agents","title":"List Voice Agents","sidebarTitle":"List Agents","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/list-agents"},{"openapi":"post /v1/agent/agents","title":"Create Voice Agent","sidebarTitle":"Create Agent","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/create-agent"},{"openapi":"get /v1/agent/agents/{agent_id}","title":"Get Voice Agent","sidebarTitle":"Get Agent","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/get-agent"},{"openapi":"patch /v1/agent/agents/{agent_id}","title":"Update Voice Agent","sidebarTitle":"Update Agent","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/update-agent"},{"openapi":"delete /v1/agent/agents/{agent_id}","title":"Delete Voice Agent","sidebarTitle":"Delete Agent","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/delete-agent"},{"openapi":"get /v1/agent/agents/{agent_id}/config","title":"Get Voice Agent Draft Config","sidebarTitle":"Get Draft Config","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/get-draft-config"},{"openapi":"patch /v1/agent/agents/{agent_id}/config","title":"Update Voice Agent Draft Config","sidebarTitle":"Update Draft Config","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/update-draft-config"},{"openapi":"post /v1/agent/agents/{agent_id}/publish","title":"Publish Voice Agent","sidebarTitle":"Publish Agent","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/publish-agent"},{"openapi":"get /v1/agent/agents/{agent_id}/versions","title":"List Voice Agent Versions","sidebarTitle":"List Agent Versions","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/list-agent-versions"},{"openapi":"get /v1/agent/agents/{agent_id}/versions/{version_number}","title":"Get Voice Agent Version","sidebarTitle":"Get Agent Version","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/get-agent-version"},{"openapi":"get /v1/agent/agents/{agent_id}/widget","title":"Get Voice Agent Widget Config","sidebarTitle":"Get Widget Config","icon":"robot","iconType":"solid","href":"/api-reference/endpoint/agent/get-widget-config"}]},{"group":"Sessions","icon":"headset","pages":[{"openapi":"post /v1/agent/sessions","title":"Create Voice Agent Session","sidebarTitle":"Create Agent Session","icon":"headset","iconType":"solid","href":"/api-reference/endpoint/agent/create-agent-session"},{"openapi":"get /v1/agent/sessions","title":"List Voice Agent Sessions","sidebarTitle":"List Agent Sessions","icon":"headset","iconType":"solid","href":"/api-reference/endpoint/agent/list-agent-sessions"},{"openapi":"get /v1/agent/sessions/{session_id}","title":"Get Voice Agent Session","sidebarTitle":"Get Agent Session","icon":"headset","iconType":"solid","href":"/api-reference/endpoint/agent/get-agent-session"},{"openapi":"get /v1/agent/sessions/{session_id}/recording","title":"Get Voice Agent Session Recording","sidebarTitle":"Get Agent Session Recording","icon":"headset","iconType":"solid","href":"/api-reference/endpoint/agent/get-agent-session-recording"},{"openapi":"post /v1/agent/sessions/{session_id}/end","title":"End Voice Agent Session","sidebarTitle":"End Agent Session","icon":"headset","iconType":"solid","href":"/api-reference/endpoint/agent/end-agent-session"}]},{"group":"Tools","icon":"wrench","pages":[{"openapi":"get /v1/agent/tools","title":"List Voice Agent Tools","sidebarTitle":"List Tools","icon":"wrench","iconType":"solid","href":"/api-reference/endpoint/agent/list-tools"},{"openapi":"post /v1/agent/tools","title":"Create Voice Agent Tool","sidebarTitle":"Create Tool","icon":"wrench","iconType":"solid","href":"/api-reference/endpoint/agent/create-tool"},{"openapi":"get /v1/agent/tools/{tool_id}","title":"Get Voice Agent Tool","sidebarTitle":"Get Tool","icon":"wrench","iconType":"solid","href":"/api-reference/endpoint/agent/get-tool"},{"openapi":"patch /v1/agent/tools/{tool_id}","title":"Update Voice Agent Tool","sidebarTitle":"Update Tool","icon":"wrench","iconType":"solid","href":"/api-reference/endpoint/agent/update-tool"},{"openapi":"delete /v1/agent/tools/{tool_id}","title":"Delete Voice Agent Tool","sidebarTitle":"Delete Tool","icon":"wrench","iconType":"solid","href":"/api-reference/endpoint/agent/delete-tool"},{"openapi":"get /v1/agent/tools/{tool_id}/agents","title":"List Voice Agents Using Tool","sidebarTitle":"List Agents Using Tool","icon":"wrench","iconType":"solid","href":"/api-reference/endpoint/agent/list-agents-using-tool"}]},{"group":"Tests","icon":"flask","pages":[{"openapi":"get /v1/agent/tests","title":"List Voice Agent Tests","sidebarTitle":"List Tests","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/list-tests"},{"openapi":"post /v1/agent/tests","title":"Create Voice Agent Test","sidebarTitle":"Create Test","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/create-test"},{"openapi":"get /v1/agent/tests/{test_id}","title":"Get Voice Agent Test","sidebarTitle":"Get Test","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/get-test"},{"openapi":"patch /v1/agent/tests/{test_id}","title":"Update Voice Agent Test","sidebarTitle":"Update Test","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/update-test"},{"openapi":"delete /v1/agent/tests/{test_id}","title":"Delete Voice Agent Test","sidebarTitle":"Delete Test","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/delete-test"},{"openapi":"put /v1/agent/agents/{agent_id}/tests/{test_id}","title":"Attach Test to Voice Agent","sidebarTitle":"Attach Test","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/attach-test"},{"openapi":"delete /v1/agent/agents/{agent_id}/tests/{test_id}","title":"Detach Test from Voice Agent","sidebarTitle":"Detach Test","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/detach-test"},{"openapi":"get /v1/agent/agents/{agent_id}/test-tools","title":"List Voice Agent Test Tools","sidebarTitle":"List Test Tools","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/list-test-tools"},{"openapi":"post /v1/agent/agents/{agent_id}/tests/run","title":"Run Voice Agent Tests","sidebarTitle":"Run Tests","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/run-tests"},{"openapi":"get /v1/agent/agents/{agent_id}/test-batches","title":"List Voice Agent Test Batches","sidebarTitle":"List Test Batches","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/list-test-batches"},{"openapi":"get /v1/agent/agents/{agent_id}/test-batches/{batch_id}","title":"Get Voice Agent Test Batch","sidebarTitle":"Get Test Batch","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/get-test-batch"},{"openapi":"get /v1/agent/test-runs","title":"List Voice Agent Test Runs","sidebarTitle":"List Test Runs","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/list-test-runs"},{"openapi":"get /v1/agent/test-runs/{run_id}","title":"Get Voice Agent Test Run","sidebarTitle":"Get Test Run","icon":"flask","iconType":"solid","href":"/api-reference/endpoint/agent/get-test-run"}]},{"group":"Knowledge Sources","icon":"book","pages":[{"openapi":"get /v1/agent/knowledge-sources","title":"List Voice Agent Knowledge Sources","sidebarTitle":"List Knowledge Sources","icon":"book","iconType":"solid","href":"/api-reference/endpoint/agent/list-knowledge-sources"},{"openapi":"post /v1/agent/knowledge-sources","title":"Create Voice Agent Knowledge Source","sidebarTitle":"Create Knowledge Source","icon":"book","iconType":"solid","href":"/api-reference/endpoint/agent/create-knowledge-source"},{"openapi":"get /v1/agent/knowledge-sources/{source_id}","title":"Get Voice Agent Knowledge Source","sidebarTitle":"Get Knowledge Source","icon":"book","iconType":"solid","href":"/api-reference/endpoint/agent/get-knowledge-source"},{"openapi":"patch /v1/agent/knowledge-sources/{source_id}","title":"Update Voice Agent Knowledge Source","sidebarTitle":"Update Knowledge Source","icon":"book","iconType":"solid","href":"/api-reference/endpoint/agent/update-knowledge-source"},{"openapi":"delete /v1/agent/knowledge-sources/{source_id}","title":"Delete Voice Agent Knowledge Source","sidebarTitle":"Delete Knowledge Source","icon":"book","iconType":"solid","href":"/api-reference/endpoint/agent/delete-knowledge-source"},{"openapi":"get /v1/agent/knowledge-sources/{source_id}/agents","title":"List Voice Agents Using Knowledge Source","sidebarTitle":"List Agents Using Knowledge Source","icon":"book","iconType":"solid","href":"/api-reference/endpoint/agent/list-agents-using-knowledge-source"}]},{"group":"Knowledge Folders","icon":"folder","pages":[{"openapi":"get /v1/agent/knowledge-folders","title":"List Voice Agent Knowledge Folders","sidebarTitle":"List Knowledge Folders","icon":"folder","iconType":"solid","href":"/api-reference/endpoint/agent/list-knowledge-folders"},{"openapi":"post /v1/agent/knowledge-folders","title":"Create Voice Agent Knowledge Folder","sidebarTitle":"Create Knowledge Folder","icon":"folder","iconType":"solid","href":"/api-reference/endpoint/agent/create-knowledge-folder"},{"openapi":"patch /v1/agent/knowledge-folders/{folder_id}","title":"Rename Voice Agent Knowledge Folder","sidebarTitle":"Rename Knowledge Folder","icon":"folder","iconType":"solid","href":"/api-reference/endpoint/agent/update-knowledge-folder"},{"openapi":"delete /v1/agent/knowledge-folders/{folder_id}","title":"Delete Voice Agent Knowledge Folder","sidebarTitle":"Delete Knowledge Folder","icon":"folder","iconType":"solid","href":"/api-reference/endpoint/agent/delete-knowledge-folder"}]},{"group":"Background Sounds","icon":"volume-high","pages":[{"openapi":"get /v1/agent/background-sounds","title":"List Voice Agent Background Sounds","sidebarTitle":"List Background Sounds","icon":"volume-high","iconType":"solid","href":"/api-reference/endpoint/agent/list-background-sounds"},{"openapi":"post /v1/agent/background-sounds","title":"Create Voice Agent Background Sound","sidebarTitle":"Create Background Sound","icon":"volume-high","iconType":"solid","href":"/api-reference/endpoint/agent/create-background-sound"},{"openapi":"delete /v1/agent/background-sounds/{asset_id}","title":"Delete Voice Agent Background Sound","sidebarTitle":"Delete Background Sound","icon":"volume-high","iconType":"solid","href":"/api-reference/endpoint/agent/delete-background-sound"}]},{"group":"LLM Models","icon":"brain","pages":[{"openapi":"get /v1/agent/llm-models","title":"List Voice Agent LLM Models","sidebarTitle":"List LLM Models","icon":"brain","iconType":"solid","href":"/api-reference/endpoint/agent/list-llm-models"}]},{"group":"Phone Numbers","icon":"phone","pages":[{"openapi":"get /v1/agent/available-phone-numbers","title":"Search Available Voice Agent Phone Numbers","sidebarTitle":"Search Available Phone Numbers","icon":"phone","iconType":"solid","href":"/api-reference/endpoint/agent/search-available-phone-numbers"},{"openapi":"get /v1/agent/phone-numbers","title":"List Voice Agent Phone Numbers","sidebarTitle":"List Phone Numbers","icon":"phone","iconType":"solid","href":"/api-reference/endpoint/agent/list-phone-numbers"},{"openapi":"post /v1/agent/phone-numbers","title":"Purchase Voice Agent Phone Number","sidebarTitle":"Purchase Phone Number","icon":"phone","iconType":"solid","href":"/api-reference/endpoint/agent/purchase-phone-number"},{"openapi":"get /v1/agent/phone-numbers/{phone_number_id}","title":"Get Voice Agent Phone Number","sidebarTitle":"Get Phone Number","icon":"phone","iconType":"solid","href":"/api-reference/endpoint/agent/get-phone-number"},{"openapi":"patch /v1/agent/phone-numbers/{phone_number_id}","title":"Update Voice Agent Phone Number","sidebarTitle":"Update Phone Number","icon":"phone","iconType":"solid","href":"/api-reference/endpoint/agent/update-phone-number"},{"openapi":"delete /v1/agent/phone-numbers/{phone_number_id}","title":"Release Voice Agent Phone Number","sidebarTitle":"Release Phone Number","icon":"phone","iconType":"solid","href":"/api-reference/endpoint/agent/release-phone-number"}]},{"group":"Phone Calls","icon":"phone-arrow-up-right","pages":[{"openapi":"post /v1/agent/phone-calls","title":"Create Voice Agent Phone Call","sidebarTitle":"Create Phone Call","icon":"phone-arrow-up-right","iconType":"solid","href":"/api-reference/endpoint/agent/create-phone-call"}]}]},{"group":"SDK Reference","pages":[{"group":"Python SDK","icon":"python","pages":[{"title":"Overview","icon":"python","href":"/api-reference/sdk/python/overview"},{"group":"Reference","icon":"book-open","pages":[{"title":null,"href":"/api-reference/sdk/python/client"},{"title":null,"href":"/api-reference/sdk/python/resources"},{"title":null,"href":"/api-reference/sdk/python/types"},{"title":null,"href":"/api-reference/sdk/python/core"},{"title":null,"href":"/api-reference/sdk/python/utils"},{"title":null,"href":"/api-reference/sdk/python/exceptions"}]},{"title":"Legacy","icon":"clock-rotate-left","href":"/archive/python-sdk-legacy/index"}]},{"group":"JavaScript SDK","icon":"js","pages":[{"title":"JavaScript SDK Reference","sidebarTitle":"Reference","icon":"book","href":"/api-reference/sdk/javascript/api-reference"}]}]}]}]},"basePath":"","title":"Text to Speech - Fish Audio","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-_HcdDqS2.js","snippetPresets-CXnm-WO6.js","utils-Dg59J__o.js","style-to-object-BY3JEAdk.js","utils-D8TRpdk7.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-B6QaxWc5.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DeMZ-lcM.js","_Uint8Array-BjA2mcVW.js","isObject-FP1Yky1u.js","ApiExamples-cjPyMv63.js","usePlaygroundInputsStore-D7BWoaw4.js","shallow-Z1ceDNSG.js","isEqual-BObTuQrO.js","CodeSnippets-D1UZ1AE-.js","CodeSnippet-B373COAT.js","getApiPlaygroundDisplay-CfL-UuDS.js","Page-DuqezyvM.js","DynamicMarkdown-5yMTCLas.js","SectionHeading-BxT1HYfP.js","icon-DYJTTD3g.js","MethodPill-4AyycJeu.js","getPastedJson-Bp3WV6cN.js","Check2Icon-PhZu6Gry.js","axios-CsQoIw0U.js","Markdown-Dy9a8hT8.js","AssistantPageLink-87tSPwGm.js","dist-CXMB3QQU.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}