Fish TTS API
POSThttps://api.acedata.cloud/fish/tts
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`.
Please select
sample_rateinteger
Output the audio sampling rate (e.g., 16000, 22050, 44100).
mp3_bitrateinteger
MP3 bitrate when `format=mp3`.
Please select
opus_bitrateinteger
Opus bitrate when `format=opus`.
latencystring
Delay mode. The upstream rejects null values, and defaults to `normal` when omitted.
Please select
chunk_lengthinteger
The chunk length passed to the upstream synthesizer.
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 the input text subjected to text normalization processing by the upstream?
Please select
prosodyobject
Rhythm coverage parameters, forwarded as is to upstream (such as speech rate, volume, etc.).
referencesarray
Inline reference audio samples will be forwarded upstream as is, 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 upstream call is completed, 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
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.
Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.
