Updated
What is the Gemini 2.5 Flash TTS API?
The Gemini 2.5 Flash TTS API is live on UnificAlly as google/gemini-2.5-flash-tts, from $0.000175 per second of generated audio. Gemini 2.5 Flash TTS is the budget voice in Google's Gemini speech range, and the one to reach for when request count matters more than the last few points of quality. It returns 24kHz mono audio, picks from the same 30 prebuilt voices as its siblings, and detects the language on its own across more than 70 of them.
It costs half of what Gemini 2.5 Pro TTS does per second. On a two-second confirmation prompt, that difference is the whole business case.
Gemini 2.5 Flash TTS API specs
| Model ID | google/gemini-2.5-flash-tts |
| Endpoint | POST https://api.unifically.com/v1/tasks |
| Request types | Text-to-speech, two-speaker dialogue |
| Voices | 30 prebuilt voices, by Gemini name or OpenAI-style alias |
| Languages | Auto-detected across 70+ languages, or pinned with a BCP-47 code |
| Output formats | mp3 (default), wav, pcm, opus, aac, flac |
| Speed | 0.25 to 4.0 |
| Reference inputs | None. Text only |
| Rate | $0.000175/sec of generated audio |
Billing is per second of generated audio, with no subscription. The Gemini API pricing guide covers the rates across the Gemini range.
How to use the Gemini 2.5 Flash TTS API
- Create an API key on the API keys page.
- Send a POST request to
/v1/taskswith the model ID and aninputobject. - Read the
task_idfrom the response, then check the task until it is finished, or pass a callback URL and wait for the result.
curl -X POST https://api.unifically.com/v1/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "google/gemini-2.5-flash-tts",
"input": {
"text": "Your order has shipped and arrives tomorrow.",
"voice": "Leda",
"response_format": "mp3"
}
}'
The response returns the task ID straight away:
{
"code": 200,
"success": true,
"data": {
"task_id": "abc123def456",
"status": "processing"
}
}
Poll GET /v1/tasks/{task_id} until status is completed, then read output.audio_url.
curl https://api.unifically.com/v1/tasks/{task_id} \
-H "Authorization: Bearer YOUR_API_KEY"
{
"code": 200,
"success": true,
"data": {
"task_id": "abc123def456",
"status": "completed",
"output": {
"audio_url": "https://files.unifically.com/audio/abc123.mp3"
}
}
}
Gemini 2.5 Flash TTS API parameters
| Parameter | Type | Default | What it does |
|---|---|---|---|
input | string | none | Text to speak. Language is auto-detected (70+ languages). Provide exactly one of input, text, or dialogue |
text | string | none | Alias for input |
dialogue | array | none | Dialogue lines as [{"text", "voice", "speaker"?}, ...], spoken in order |
voice | string | alloy | Voice name: a Gemini voice or an OpenAI-style alias |
response_format | string | mp3 | Output container: mp3, wav, pcm, opus, aac, flac |
speed | number | 1.0 | Playback speed multiplier, 0.25 to 4.0 |
instructions | string | none | Style directions the voice follows but does not read, e.g. "speak like a sports commentator" |
language | string | auto | BCP-47 code to pin the output language |
speakers | array | none | Two-speaker dialogue config. When set, voice is ignored |
The Gemini 2.5 Flash TTS API documentation has the full reference, with the voice list, language codes, and output formats.
Two-speaker dialogue request
Each line carries its own voice, and lines are spoken in order. A request is limited to 2 distinct voices.
curl -X POST https://api.unifically.com/v1/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "google/gemini-2.5-flash-tts",
"input": {
"dialogue": [
{ "text": "Did the deploy finish?", "voice": "onyx", "speaker": "Joe" },
{ "text": "Yes, all green, we are live!", "voice": "nova", "speaker": "Jane" },
{ "text": "Great news.", "voice": "onyx", "speaker": "Joe" }
]
}
}'
Gemini 2.5 Flash TTS key features
Lowest cost per second. Billing is tied to delivered audio, so short snippets stay cheap and a high request rate stays affordable.
The full voice roster. All 30 prebuilt voices are available, so a product can use the same voice on Flash for short prompts and on Pro for long-form narration without a mismatch.
Two-speaker dialogue. Both sides of a short exchange render in a single request, each line mapped to its own voice.
Style instructions. A direction like "speak briskly, like a transit announcement" sets the read without becoming part of the spoken text.
Six output formats. MP3, WAV, raw PCM, Opus, AAC, and FLAC, which covers both web playback and telephony-style pipelines that want raw samples.
What Gemini 2.5 Flash TTS is best for
High-volume notifications
Order confirmations, alerts, and status messages where per-request cost decides the budget.
In-app voice prompts
Short UI speech that ships in every session and has to stay cheap at scale.
Prototyping voice features
Iterate on script and voice choice without spending much, then move to Pro or 3.1 if quality demands it.
IVR and phone trees
Raw PCM output drops into telephony pipelines that expect samples rather than files.
Localized microcopy
The same short string across dozens of languages, detected automatically.
Batch caption audio
Large numbers of short reads generated in bulk for video or e-learning libraries.
Gemini 2.5 Flash TTS use cases
Give an ecommerce app spoken order updates in the buyer's own language, generated per event and cached. Voice a phone tree where every branch is a two-second read and the monthly volume runs to tens of thousands of calls. Prototype a voice assistant persona by trying six voices against the same script before committing. Generate a library of short e-learning captions in bulk, keeping one narrator voice across hundreds of files at a cost per file small enough that regenerating the whole set after a copy change is not a budget decision.
Gemini 2.5 Flash TTS limitations
Quality is the tradeoff. On the ArtificialAnalysis Text to Speech leaderboard it holds rank 37 with an Elo of 1090, well behind Gemini 3.1 Flash TTS at rank 5 and 1212, and the gap shows most on long, emotionally varied passages. There are no audio tags, so expressive direction is limited to the style instruction. Dialogue tops out at two distinct voices, and the 32,000 token context window still applies, so long scripts need chunking.
FAQs
People also ask about Gemini 2.5 Flash TTS
Gemini 2.5 Flash TTS is the fastest and lowest-cost voice in Google's Gemini range. It converts text to 24kHz speech using any of 30 prebuilt voices, detects the language automatically across more than 70, and supports two-speaker dialogue. It is the sensible default for high-volume, short-form speech.
Generate a key on the API keys page once you have signed up, and send it as Authorization: Bearer <key> to https://api.unifically.com/v1/tasks. The first speech request names google/gemini-2.5-flash-tts and carries the text to speak, with a voice such as Leda if you want a specific one; you pay per second of delivered audio from a prepaid balance.
Post model: google/gemini-2.5-flash-tts with an input object that holds exactly one of text, input or a two-voice dialogue, plus optional voice, response_format (mp3 by default), speed, instructions and language. Poll GET /v1/tasks/{task_id} until status is completed, then read the file from output.audio_url.
Half the price per second of delivered audio. On short snippets like confirmations, alerts, and UI prompts the quality gap is hard to hear, which makes Flash the better economics at volume. Reach for Pro when a single take runs for minutes rather than seconds.
Yes, up to two distinct voices in one request. Either send a dialogue array where every line names its own voice, or write a script with speaker names and pass a speakers map. A third voice is rejected.
No. Bracketed directions such as [excited] belong to Gemini 3.1 Flash TTS and would be spoken aloud here. Use the style instruction field to steer the delivery instead, since it shapes the read without being read.
All 30 Gemini prebuilt voices, the same roster the other Gemini speech models use, from Kore and Puck to Sulafat and Gacrux. Language is detected from the text across more than 70 languages, and a BCP-47 code like es-US or hi-IN pins it when you need a specific locale.
MP3 by default, and also WAV, raw PCM, Opus, AAC, and FLAC. Output is 24kHz 16-bit mono, so WAV and PCM hold the raw model output and the compressed formats are encoded from it.
Per second of audio actually delivered: $0.000175/sec, read from provider usage after each generation instead of estimated from your text. Short prompts cost proportionally little, which is what makes high request volumes practical.
On the ArtificialAnalysis Text to Speech leaderboard, Gemini 2.5 Flash TTS sits at rank 37 with an Elo of 1090, while Gemini 3.1 Flash TTS reaches rank 5 at 1212. Flash 2.5 competes on price per second, not on top-of-board quality.
Gemini 2.5 Flash TTS guides and comparisons
Review pricing, limits, and tested outputs before running this model.
