Fish TTS API
POSThttps://api.acedata.cloud/fish/tts
Fish Audio text-to-speech API — convert text into natural speech using a chosen voice model.
Request Headers
acceptstring
Specify the format of the response returned by the server. If not specified, the default format is `application/json`.
Please select
modelstring
The TTS model used can be `s1` or `s2-pro`, with `s2-pro` as the default.
Please select
authorizationstring
Bearer token
Request Body
textstringRequired parameter
Text content to be synthesized. Required, must be a non-empty string.
reference_idstring
Voice model ID (single speaker). A string array can also be passed in multi-speaker scenarios.
formatstring
Output audio format, default is `mp3`. Optional `mp3`, `wav`, `pcm`, where both `wav` and `pcm` return a WAV container.
Please select
sample_rateinteger
Output the audio sampling rate (e.g., 16000, 22050, 44100).
mp3_bitrateinteger
MP3 bitrate when `format=mp3`.
Please select
latencystring
Delay mode. Does not accept null values; defaults to `normal` when omitted.
Please select
chunk_lengthinteger
The block length of speech synthesis.
min_chunk_lengthinteger
Minimum block length.
temperaturenumber
Sampling temperature (0.0–1.0). The higher the value, the more diverse the output; the lower the value, the more stable and consistent it is.
top_pnumber
Top-p nucleus sampling parameter, controls output diversity.
repetition_penaltynumber
The repetition penalty coefficient applied during the generation process.
max_new_tokensinteger
Maximum number of new tokens generated.
normalizeboolean
Is text normalization processing performed on the input text?
Please select
prosodyobject
Rhythm coverage parameters (such as speech rate, volume, etc.).
referencesarray
Inline reference audio samples for zero-shot voice cloning.
callback_urlstring
Optional callback URL. When specified, the interface immediately returns `{"task_id": "5872ab00-3cf4-4040-a798-8510aaa16756", "started_at": "2025-05-09T12:34:56.789Z"}`, and after the synthesis is complete, the final `{audio_url, ...}` result will be pushed to this URL via POST.
asyncboolean
Whether to process in asynchronous mode. When set to `true`, the interface immediately returns `task_id`, without the need to provide `callback_url`, and then the result can be obtained by polling the corresponding task query interface; if `callback_url` is also provided, the result will be pushed to that callback address.
Please select
Response

Integration guide
Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.
Fish voice generation
Allow Use General Balance
When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.