Gemini TTS API Pricing and Setup:
Gemini 3.8 Flash TTS at ¥0.072 CNY per Request

Google's Gemini 3.8 Flash TTS text-to-speech API on Brioi is billed per request: ¥0.072 CNY per successful request, whatever the text length. 30 built-in voices, style prompts and multi-speaker dialog, 24kHz PCM output, with a complete WAV conversion example.

Updated 5 min read

On this page(6)
  1. How much does the Gemini TTS API cost?
  2. Which voices and languages are supported?
  3. Is the API OpenAI-compatible?
  4. Synthesize one line with a style prompt and save it as WAV
  5. How do I generate a multi-speaker dialog?
  6. How do I troubleshoot errors?

On Brioi, Google’s Gemini 3.8 Flash TTS is billed per request: ¥0.072 CNY for each successful synthesis request, regardless of text length or audio duration. Failed requests aren’t charged. This is the price of the lowest-priced route; other routes are priced differently. Prices were read on 2026-12-04 and are in Chinese yuan (CNY). The current rate is on the pricing page; search for gemini-3.8-flash-tts.

Gemini 3.8 Flash TTS is a speech synthesis model released by Google on September 23, 2026 (source: Google blog, checked 2026-11-30).

How much does the Gemini TTS API cost?

One request counts once. A multi-speaker dialog sent in one request also counts once.

Requests Cost
1 ¥0.072 CNY
100 ¥7.20 CNY
1,000 ¥72.00 CNY
10,000 ¥720.00 CNY

Budget as requests × price per request. A short-drama episode with 80 lines, one request per line and one retake per line on average, is 160 requests: ¥11.52 CNY.

Google’s official API bills by tokens: USD 0.50 per million text input tokens and USD 9 per million audio output tokens, about USD 0.00225 per 10 seconds of audio. Those prices apply through December 31, 2026; from January 1, 2027, input is USD 1 and output USD 18 (source: Gemini API pricing page, checked 2026-11-30). The two models differ: the official API charges by audio length, Brioi charges per request. The longer the text in each request, the more per-request billing pays off. If your lines are all two or three seconds long, run your own script through both calculations before deciding.

Which voices and languages are supported?

There are 30 built-in voices; voice cloning isn’t supported. Voices aren’t tied to a language, so the same voice can read Chinese, Japanese, Korean, English and more.

Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat

Is the API OpenAI-compatible?

No. Only Gemini’s native generateContent format is supported, at POST https://vip.brioi.com/v1beta/models/gemini-3.8-flash-tts:generateContent. The OpenAI-format /v1/chat/completions and /v1/audio/speech aren’t available.

Authenticate with your Brioi key using any one of three methods: an Authorization: Bearer header, an x-goog-api-key header or a ?key= parameter.

Requests are synchronous: the audio comes back directly after a few seconds to about twenty seconds. There’s no task ID and no polling.

One difference from Google’s native request: style and speaker go in each part’s speech_metadata field. Google’s official SDK doesn’t generate this field, so add it to the request body yourself.

Field Required Notes
contents[].parts[].text Yes The text to read aloud. Put only one item in contents
contents[].parts[].speech_metadata.style No Style prompt, for example “low voice, restrained tone”. It only affects delivery and isn’t read aloud
contents[].parts[].speech_metadata.speaker Required for multiple speakers Who says this line
generationConfig.responseModalities Yes Must be ["AUDIO"]
generationConfig.speechConfig.voiceConfig Required for a single speaker Put the voice name in prebuiltVoiceConfig.voiceName
generationConfig.speechConfig.multiSpeakerVoiceConfig Required for multiple speakers Assign one voice per speaker; use either this or voiceConfig

Synthesize one line with a style prompt and save it as WAV

Create a Brioi API key and set it as the BRIOI_API_KEY environment variable. A successful request below is billed once, ¥0.072 CNY, and the response is saved to speech.json.

curl -X POST "https://vip.brioi.com/v1beta/models/gemini-3.8-flash-tts:generateContent" \
  -H "Authorization: Bearer $BRIOI_API_KEY" \
  -H "Content-Type: application/json" \
  -o speech.json \
  -d '{
    "contents": [{
      "role": "user",
      "parts": [{
        "text": "Just go. I never want to see you again.",
        "speech_metadata": {"style": "On the verge of tears, voice trembling in the second half"}
      }]
    }],
    "generationConfig": {
      "responseModalities": ["AUDIO"],
      "speechConfig": {
        "voiceConfig": {
          "prebuiltVoiceConfig": {"voiceName": "Leda"}
        }
      }
    }
  }'

The audio is in candidates[0].content.parts[].inlineData.data as base64-encoded raw PCM: 24000 Hz, mono, 16-bit signed little-endian, with no WAV header, so renaming the file won’t make it play. Convert it to speech.wav with the Python script below, which uses only the standard library:

import base64, json, wave

resp = json.load(open("speech.json"))
parts = resp["candidates"][0]["content"]["parts"]
pcm = b"".join(base64.b64decode(p["inlineData"]["data"]) for p in parts if "inlineData" in p)

with wave.open("speech.wav", "wb") as w:
    w.setnchannels(1)
    w.setsampwidth(2)
    w.setframerate(24000)
    w.writeframes(pcm)

For MP3, save the decoded PCM as speech.pcm and convert it with ffmpeg:

ffmpeg -f s16le -ar 24000 -ac 1 -i speech.pcm speech.mp3

How do I generate a multi-speaker dialog?

Put each line in its own part, mark who says it with speech_metadata.speaker, then assign each speaker a voice in multiSpeakerVoiceConfig. The names must match in both places. Save the request body below as dialog.json:

{
  "contents": [{
    "role": "user",
    "parts": [
      {"text": "All these three years, you've been lying to me?", "speech_metadata": {"speaker": "Jake", "style": "Low voice, restrained tone"}},
      {"text": "I haven't... Just let me explain.", "speech_metadata": {"speaker": "Lena", "style": "On the verge of tears"}}
    ]
  }],
  "generationConfig": {
    "responseModalities": ["AUDIO"],
    "speechConfig": {
      "multiSpeakerVoiceConfig": {
        "speakerVoiceConfigs": [
          {"speaker": "Jake", "voiceConfig": {"prebuiltVoiceConfig": {"voiceName": "Charon"}}},
          {"speaker": "Lena", "voiceConfig": {"prebuiltVoiceConfig": {"voiceName": "Leda"}}}
        ]
      }
    }
  }
}
curl -X POST "https://vip.brioi.com/v1beta/models/gemini-3.8-flash-tts:generateContent" \
  -H "Authorization: Bearer $BRIOI_API_KEY" \
  -H "Content-Type: application/json" \
  -o speech.json \
  -d @dialog.json

Three things to watch:

  • Writing the speaker only in text (like “Jake: …”) doesn’t replace speech_metadata.speaker. With multiSpeakerVoiceConfig, every part needs a speaker, or you get a 400.
  • You get one audio clip for the whole dialog; it isn’t split by line. If you need to match a timeline line by line, for example to replace the voiceover in a finished video, send one request per line.
  • Put style prompts in style, not in text, or they may be read aloud too.

How do I troubleshoot errors?

Symptom Common cause
400 Invalid request parameters. A multi-speaker dialog with a part missing speaker returns 400
401 Missing or invalid key
403 Balance too low, or the key has no access to gemini-3.8-flash-tts. Check that GET /v1/models lists this model
429 Too many requests
500, 502, 503 Temporary service error; try again later

Don’t resend right away after a timeout. First note the X-Oneapi-Request-Id response header and the error message, then investigate, so the same line isn’t synthesized twice.

The full Gemini speech synthesis API docs (in Chinese) list every field and the response structure. For language and image models and the other available models, see the Brioi developer page.