Skip to main content
This interface is based on the Fish Audio Official TTS API, with differences only in the authentication method (using the platform token) and asynchronous callback (callback_url extension). The request body structure is consistent with the upstream. The address is POST https://api.acedata.cloud/fish/tts.

Application Process

To use the Fish TTS API, first go to the Ace Data Cloud Console to obtain your API Token for backup. 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. After completing this, you will be automatically returned to the current page. 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 trial 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

Field naming is completely consistent with upstream. Except for callback_url, the meanings and values of other fields refer to the Fish Official TTS Documentation.

Example 1: Minimum Request (text + format=mp3)

Response (actual test):
audio_url points to the platform CDN, which can be directly downloaded via GET or played in <audio>. 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):
Response (actual test):

Example 3: Adjusting Speech Rate / Volume (prosody)

Response (actual test):
speed greater than 1 speeds up, less than 1 slows down; volume is in dB, 0 means no change, positive numbers indicate gain, negative numbers indicate attenuation.

Example 4: Switching Model + Controlling Bitrate

Switch to the stable model via HTTP header model: s1, add mp3_bitrate: 128 in the request body to control the MP3 bitrate:
Response (actual measurement):

Example 5: PCM Raw Waveform

For scenarios that require real-time stitching in the browser or subsequent processing (mixing, speed change) on the client side, it is recommended to use pcm:
Response (actual measurement):
The extension of the link follows the format in the request: mp3 gets .mp3, wav and pcm get .wav (WAV container, 16 bit PCM).

Asynchronous Callback (callback_url)

Synthesis of long texts 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 is truly completed, it will callback the complete result in POST JSON format to that URL, carrying the same task_id in the request body.
Immediately returns (actual measurement):
Later, callback_url will receive something like:
You can also actively pull results by task_id using the Fish Tasks API, see that document for details.

Error Handling

  • 400 token_mismatched: Missing or invalid request parameters (most commonly text is empty, or format has a value other than mp3/wav/pcm).
  • 401 invalid_token: Authentication token does not exist or is invalid.
  • 429 too_many_requests: Triggered account rate limit.
  • 500 api_error: Internal server error.
Example of error response:
Parameter validation errors will place the original pydantic error message from upstream in the message field, making it easier to locate which field is invalid, for example:

Conclusion

The minimum cost of integrating Fish TTS is: replace the authentication in the existing code calling api.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 the callback_url asynchronous callback; for discovering cloned voice reference_id, please refer to Fish Model Query and Fish Model Get.