GET
/v1/schemas/fish-audio/audio/v1%2Ftts
Accept:
Request body
21 properties · 1 required · 5 $defs| property | type | description | constraints |
|---|---|---|---|
| text* | string | Text to convert to speech. | |
| temperature | number | Controls expressiveness. Higher is more varied, lower is more consistent. | 0 ≤ n ≤ 1 · default: 0.7 |
| top_p | number | Controls diversity via nucleus sampling. | 0 ≤ n ≤ 1 · default: 0.7 |
| references | ReferenceAudio[] | ReferenceAudio[][] | 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. **Mult… | nullable |
| reference_id | string | string[] | 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… | nullable · default: null |
| prosody | ProsodyControl | Controls for adjusting the prosody (rhythm and intonation) of generated speech. | nullable |
| chunk_length | integer | Text segment size for processing. | 100 ≤ n ≤ 300 · default: 300 |
| normalize | boolean | 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. | default: true |
| language | string | 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. | length ≤ 35 · nullable |
| format | enum | Output audio format. | wav | pcm | mp3 | opus · default: "mp3" |
| sample_rate | integer | Audio sample rate in Hz. When null, uses the format's default (44100 Hz for most formats, 48000 Hz for opus). | nullable |
| mp3_bitrate | enum | MP3 bitrate in kbps. Only applies when format is mp3. | 64 | 128 | 192 · default: 128 |
| opus_bitrate | enum | Opus bitrate in bps. -1000 for automatic. Only applies when format is opus. | -1000 | 24000 | 32000 | 48000 | 64000 · default: -1000 |
| latency | enum | Latency-quality trade-off. normal: best quality, balanced: reduced latency, low: lowest latency. | low | normal | balanced · default: "normal" |
| max_new_tokens | integer | Maximum audio tokens to generate per text chunk. | default: 1024 |
| repetition_penalty | number | Penalty for repeating audio patterns. Values above 1.0 reduce repetition. | default: 1.2 |
| min_chunk_length | integer | Minimum characters before splitting into a new chunk. | 0 ≤ n ≤ 100 · default: 50 |
| condition_on_previous_chunks | boolean | Use previous audio as context for voice consistency. | default: true |
| early_stop_threshold | number | Early stopping threshold for batch processing. | 0 ≤ n ≤ 1 · default: 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. | default: [] |
| pronunciation_dictionary | PronunciationDictionaryRef[] | Pronuncia… | 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 … | nullable · default: null |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"fish-audio","endpointId":"v1/tts","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}