POST https://api.acedata.cloud/fish/tts.
Application Process
To use the Fish TTS API, first obtain your API Token from the Ace Data Cloud Console and keep it for later use.
If you are not yet logged in or registered, you will be automatically redirected to the login page and invited to register and log in. After completion, you will automatically return to the current page.
One API Token can invoke all platform services; there is no need to apply separately for each service. Your first application includes free credits for a free trial; when credits are insufficient, you can top up your general balance in the Console.
📘 Complete documentation: Fish TTS API →
Request Headers
Request Body Fields
One-time cloning only accepts HTTPS audio URLs, and does not accept MessagePack, Base64, data URIs, or URLs with credentials. Reference audio is recommended to be 10–270 seconds; Studio uses the more conservative range of 10–60 seconds.
Example 1: Minimal Request (text + format=mp3)
audio_url points to this platform’s CDN, and can be downloaded directly with GET or played in <audio>. The final successful response also returns a top-level cost, where amount is the Credits actually deducted for this request; if there is an account discount, list_amount indicates the credits before the discount. The link remains available long-term, but it is still recommended to keep a copy in your own storage.
Example 2: Using a Cloned Voice reference_id
Below uses a public Spanish voice on the Fish platform (_id can be retrieved through Fish Model Query):
Example 3: One-Time Instant Voice Cloning (references)
Place the reference audio at a public HTTPS address and provide the accurate original text actually spoken in it. This voice is used only for this synthesis and will not create a long-term model:
Example 3: Adjusting Speech Speed / Volume (prosody)
speed greater than 1 speeds up, while less than 1 slows down; the unit of volume is dB, where 0 means unchanged, positive values increase gain, and negative values attenuate.
Example 5: Switching Models + Controlling Bitrate
Switch to the stable model through the HTTP headermodel: s1, and add mp3_bitrate: 128 in the request body to control the MP3 bitrate:
Example 6: PCM Raw Waveform
For scenarios where real-time concatenation is needed in the browser, or subsequent processing (mixing, speed adjustment) is needed on the client side, it is recommended to usepcm:
The extension of the link follows theformatin the request:mp3produces.mp3, whilewavandpcmproduce.wav(WAV container, 16-bit PCM).
Asynchronous Callback (callback_url)
Synthesizing long text at once may take from over ten seconds to dozens of seconds, and retries are required if the connection is interrupted. After passing callback_url in the request body, the API immediately returns {task_id, started_at}. When the upstream processing is actually complete, it sends the complete result back to that URL as POST JSON, with the same task_id and the top-level cost for the final billing of this request in the body. The initial task confirmation has not completed synthesis yet, so it does not include cost.
callback_url will receive something like:
task_id using the Fish Tasks API; the response.cost in the final-state record is consistent with the cost in the callback. See that document for details.
Error Handling
400 token_mismatched: Request parameters are missing or invalid (most commonly,textis empty, orformatis assigned a value other thanmp3/wav/pcm).401 invalid_token: The authentication token does not exist or is invalid.429 too_many_requests: The account rate limit has been triggered.500 api_error: Internal server error.
message field, for example:
Conclusion
The minimum cost of integrating Fish TTS is: replace the authentication in existing code callingapi.fish.audio/v1/tts with this platform’s token, and explicitly include format: "mp3" in the request body. For long-text scenarios, it is recommended to use the callback_url asynchronous callback; for discovering cloned voice reference_ids, please use Fish Model Query together with Fish Model Get.
