For coding agents, discover the current recommended TTS shortlist first with
GET /v1/models?recommended_for=tts, then send the selected model explicitly to this endpoint.Request Body
Synchronous request timeout: This non-chat endpoint waits for the routed model to finish. Large inputs, long audio, or large batches can exceed common 30s client defaults, so set your HTTP client timeout to at least120s.
Supported optional fields vary by model family. TokenLab validates this field matrix before routing: OpenAI TTS accepts voice, instructions, response_format, stream_format, and speed; MiniMax speech accepts voice, voice_id, response_format, stream_format, and speed; Gemini TTS accepts prompt, language_code, voice, response_format, stream_format, speed, and temperature; narrower Vidu/Kling-style TTS routes may accept only input and stream_format. Unknown top-level fields, including user, return 400 unsupported_parameter instead of being ignored.
TTS model. Examples include
tts-1, gpt-4o-mini-tts, speech-02-hd, and gemini-2.5-flash-tts. Query GET /v1/models?recommended_for=tts for the current shortlist.The text to generate audio for. Maximum 4096 characters.
Voice selector. Pass a built-in voice name such as
nova, a Gemini voice such as Kore, or an object like { "id": "voice-id" } for compatible custom voices.Provider-native voice selector for MiniMax-compatible speech models.
Optional style or delivery instructions for OpenAI-compatible TTS models that support them.
Optional speaking style prompt for Gemini TTS models.
Optional language code, for example
en-US, for Gemini, xAI, and compatible TTS routes.Audio format. Common values include
mp3, opus, aac, flac, wav, and pcm; supported values vary by model family.TokenLab delivery format:
audio or sse. stream_format=sse is not supported for tts-1 or tts-1-hd.Speech speed for model families that support it (0.25 to 4.0).
Sampling temperature for Gemini-compatible TTS routes (0 to 2).
Response
Returns the audio file in the requested format.Voice Samples
| Voice | Description |
|---|---|
alloy | Neutral, balanced |
ash | Calm, measured |
ballad | Melodic, expressive |
coral | Warm, inviting |
echo | Warm, conversational |
fable | Expressive, narrative |
nova | Friendly, clear |
onyx | Deep, authoritative |
sage | Wise, thoughtful |
shimmer | Soft, gentle |
verse | Dynamic, versatile |
Response example
Important fields
Event or message type returned by the API.
Raw response body. Save it directly instead of parsing it as JSON.