Skip to content

Text-to-Speech

Google TTS models are called via /v1/audio/speech. The response is raw audio bytes.

Terminal window
curl https://llmtr.com/v1/audio/speech \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash-preview-tts",
"input": "Read today\'s summary in a calm, clear voice.",
"voice": "Kore"
}' --output speech.wav

| Field | Required | Description | |---|---|---| | model | yes | Canonical TTS model ID | | input | yes | Text to read (UTF-8) | | voice | yes | Voice character (model-specific list) | | speaker | no | Speaker name for multi-speaker output | | response_format | no | wav, mp3, opus, aac, flac | | speed | no | 0.25 - 4.0 |

Gemini TTS models have no default voice. A request without voice is rejected with a 400 whose message names the missing field and gives an example value:

{
"error": {
"message": "\"voice\" is required for google/gemini-2.5-flash-preview-tts. Send it in the request body, for example: {\"model\": \"google/gemini-2.5-flash-preview-tts\", \"input\": \"Hello\", \"voice\": \"Kore\"}. Available voices include Kore, Puck, Charon, Aoede, Fenrir, Leda, Orus and Zephyr.",
"type": "invalid_request"
}
}

Example voices for Gemini TTS: Kore, Puck, Charon, Aoede, Fenrir, Leda, Orus, Zephyr. Full list is on the model detail page.

xai/grok-voice-tts uses the same endpoint but requires language instead of voice. When it is missing the request is likewise rejected with a 400 and an example.

Terminal window
curl https://llmtr.com/v1/audio/speech \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "xai/grok-voice-tts",
"input": "Read today\'s summary in a calm, clear voice.",
"language": "en"
}' --output speech.wav

language is an ISO 639-1 code (tr, en). voice is optional; the default voice is used when it is omitted.

Billed per character or per second depending on the model. See the model card's native unit.