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 for future reference.
If you are not logged in or registered, you will be automatically redirected to the login page to invite you to register and log in, and will return to the current page upon completion.
One API Token can call all services on the platform, no need to apply separately for each service. The first application will grant a free quota for a free experience; when the quota is insufficient, you can recharge the general balance in the console.
📘 Complete Documentation: Fish TTS API →
Request Headers
Request Body Fields
One-time cloning only accepts HTTPS audio URLs, does not accept MessagePack, Base64, data URI, or credentialed URLs. Recommended reference audio length is 10–270 seconds; Studio uses a more conservative range of 10–60 seconds.
Example 1: Minimal Request (text + format=mp3)
audio_url points to the CDN of this platform, which can be directly downloaded via GET or played in <audio>. The final successful response will also return the top-level cost, where amount is the actual Credits deducted for this transaction; if there is an account discount, list_amount indicates the amount before the discount. The link is long-term available, but it is still recommended to keep a copy in your own storage.
Example 2: Using Cloned Voice reference_id
Below is a public Spanish voice on the Fish platform (the _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 exact original text spoken. This voice is only used for this synthesis and will not create a long-term model:
Example 3: Adjusting Speech Rate / Volume (prosody)
speed greater than 1 speeds up, less than 1 slows down; volume is in dB, 0 means no change, positive numbers increase, negative numbers decrease.
Example 5: Switching Model + Controlling Bitrate
Switch to stable model via HTTP headermodel: s1, add mp3_bitrate: 128 in the request body to control MP3 bitrate:
Example 6: PCM Raw Waveform
Recommended for scenarios where real-time stitching in the browser or subsequent processing (mixing, speed change) is needed, usepcm:
The extension of the link follows theformatin the request:.mp3formp3,.wavforwavandpcm(WAV container, 16 bit PCM).
Asynchronous Callback (callback_url)
Long text synthesis may take several seconds to tens of seconds, and if the connection is interrupted, it needs to be retried. After passing callback_url in the request body, the interface will immediately return {task_id, started_at}, and when the upstream completes, it will POST the complete result back to that URL in JSON format, with the same task_id and the top-level cost for this billing. The initial task confirmation has not completed synthesis, so it does not include cost.
callback_url will receive something like:
task_id using Fish Tasks API; the final state record’s response.cost is consistent with the cost in the callback, see that document for details.
Error Handling
400 token_mismatched: Missing or invalid request parameters (most common istextbeing empty, orformathaving a value other thanmp3/wav/pcm).401 invalid_token: Authentication token does not exist or is invalid.429 too_many_requests: Account rate limit triggered.500 api_error: Internal server error.
message field, indicating the invalid fields, for example:
Conclusion
The minimum cost to integrate Fish TTS is: replace the authentication in the existing code callingapi.fish.audio/v1/tts with the platform token, and explicitly include format: "mp3" in the request body. For long text scenarios, it is recommended to use callback_url for asynchronous callbacks; for discovering cloned voice reference_id, please refer to Fish Model Query and Fish Model Get.
