Skip to main content
Model logo

Gemini 2.5 Flash TTS API

  • Text to Speech

Gemini 2.5 Flash TTS is part of the Gemini model familyView all Gemini models

Mode
Output

Your generated audio will appear here

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 IDgoogle/gemini-2.5-flash-tts
EndpointPOST https://api.unifically.com/v1/tasks
Request typesText-to-speech, two-speaker dialogue
Voices30 prebuilt voices, by Gemini name or OpenAI-style alias
LanguagesAuto-detected across 70+ languages, or pinned with a BCP-47 code
Output formatsmp3 (default), wav, pcm, opus, aac, flac
Speed0.25 to 4.0
Reference inputsNone. 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

  1. Create an API key on the API keys page.
  2. Send a POST request to /v1/tasks with the model ID and an input object.
  3. Read the task_id from 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

ParameterTypeDefaultWhat it does
inputstringnoneText to speak. Language is auto-detected (70+ languages). Provide exactly one of input, text, or dialogue
textstringnoneAlias for input
dialoguearraynoneDialogue lines as [{"text", "voice", "speaker"?}, ...], spoken in order
voicestringalloyVoice name: a Gemini voice or an OpenAI-style alias
response_formatstringmp3Output container: mp3, wav, pcm, opus, aac, flac
speednumber1.0Playback speed multiplier, 0.25 to 4.0
instructionsstringnoneStyle directions the voice follows but does not read, e.g. "speak like a sports commentator"
languagestringautoBCP-47 code to pin the output language
speakersarraynoneTwo-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.