Skip to navigation

Synthesize speech (Text to Speech)

View as Markdown

Relays to https://api.fish.audio/v1/tts, overwriting Authorization with the gateway’s Fish Audio key. text is the only required body field; reference_id selects a voice, references (application/msgpack bodies only) supplies inline audio for zero-shot cloning, and format (mp3 default, wav, pcm, opus) plus sample_rate/prosody/latency control the output. Billed on the real UTF-8 byte count of text at $15.825/1M bytes, fee included.

Authentication

AuthorizationBearer

Your per-client bearer token — the API key the gateway issued to you. Present it in Authorization: Bearer <token> form. A token that is missing, unknown, or revoked draws a 401. Before the call is sent upstream the token is removed (stripped, or swapped for the upstream’s own credential); it never makes it past the gateway.

Headers

modelenumRequiredDefaults to s2.1-pro
Which Fish Audio TTS model to use.
Allowed values:

Request

This endpoint expects a map from strings to any.

Response

Chunked binary audio (Transfer-Encoding: chunked) in the requested format — audio/mpeg for mp3, raw bytes for wav/pcm/opus. Relayed byte-for-byte.

Errors

401
Unauthorized Error
404
Not Found Error