Skip to main content
POST
  1. After submission, a task_id will be returned. If you provided a callback_url, when the task status becomes finished or failed, a POST request will be sent to the callback_url.
  2. Regardless of whether callback_url is provided, you can retrieve the result through the unified Query Task Status endpoint.
Gemini 3.8 Flash TTS is Google’s highest-fidelity Gemini 3.8 text-to-speech model. It reads a script with one voice, or performs a two-speaker dialogue, and returns WAV audio. Choose from 30 preset voices, steer tone, pace and emotion with style instructions, and let the model detect the language (Google lists 130). It suits audiobooks, podcast-style conversations, studio narration and character dialogue. For high-volume, everyday speech with the same request fields, use Gemini 3.8 Flash-Lite TTS. Switch between them by changing model.

Models

  • google/gemini-3.8-flash/text-to-speech — Gemini 3.8 Flash text-to-speech for single-voice narration and two-speaker dialogue.

Features

  • Text-to-speech with one voice, or a scripted dialogue between two speakers.
  • 30 preset voices, set per request or per speaker.
  • Plain-language style_instructions for tone, pace, accent and emotion, globally or per dialogue turn.
  • Automatic language detection (Google lists 130 languages).
  • WAV audio output.

Input modes

  • Single speaker: send text and, optionally, voice (default Kore).
  • Two-speaker dialogue: send exactly two speakers and a list of turns. Do not send top-level text or voice in this mode.

Required parameters

Single speaker:
  • text (string): The text to speak. Not blank.
Two-speaker dialogue:
  • speakers (object[]): Exactly two objects, each with only:
    • speaker_id (string): A non-empty alias, unique within the request, such as host.
    • voice (string): One of the Voice Presets.
  • turns (object[]): At least one line, in speaking order:
    • speaker_id (string): Must match one of the two speakers.
    • text (string): What that speaker says. Not blank.
    • style_instructions (string, optional): Direction for this line only.

Optional parameters

  • voice (string): Single-speaker mode only. One of the Voice Presets. Default Kore.
  • style_instructions (string): Global direction for the whole request, such as Calm, warm documentary narration. Works in both modes.
  • enable_safety_checker (boolean): Run the upstream safety checker. Default true.

Output

The finished task returns one WAV audio file in the files array of Query Task Status and the callback payload. The output format is fixed; there is no output_format field.

Voice Presets

voice and speakers[].voice accept these 30 values (case-sensitive):
  • Achernar
  • Achird
  • Algenib
  • Algieba
  • Alnilam
  • Aoede
  • Autonoe
  • Callirrhoe
  • Charon
  • Despina
  • Enceladus
  • Erinome
  • Fenrir
  • Gacrux
  • Iapetus
  • Kore
  • Laomedeia
  • Leda
  • Orus
  • Pulcherrima
  • Puck
  • Rasalgethi
  • Sadachbia
  • Sadaltager
  • Schedar
  • Sulafat
  • Umbriel
  • Vindemiatrix
  • Zephyr
  • Zubenelgenubi

Examples

  • Single-speaker narration with style: voice: Charon with a global style_instructions for slow documentary delivery.
  • Two-speaker podcast dialogue: host (Kore) and guest (Puck), with per-turn style_instructions on two lines and a callback_url.

Notes

  • Credits are reserved at submission and depend on the billable character count: text, the global style_instructions, and every turn’s text and style_instructions. Speaker IDs are not counted. A failed task is refunded in full. See the pricing page for current rates.
  • Gemini 3.8 Flash-Lite TTS is billed at a lower rate with the same fields.
  • Dialogue supports exactly two speakers. A third speaker, a speaker_id in turns that is not in speakers, or top-level text/voice in a dialogue request returns 400.
  • Put delivery directions in style_instructions, not in text; the model may read directions inside text aloud.
  • output_format, language_code, temperature, seed and timestamps are not supported on this endpoint, and neither are voice cloning or custom voices.

Authorizations

Authorization
string
header
required

All API endpoints require Bearer Token authentication

Get your API Key:

Go to Dashboard → API Key (API Key Management Page) to get your API Key

Add it to the request header:

Body

application/json
model
string
required

Model ID. Use google/gemini-3.8-flash/text-to-speech.

Example:

"google/gemini-3.8-flash/text-to-speech"

input
object
required

Generation parameters. Send text (single speaker) or speakers + turns (two-speaker dialogue), not both.

callback_url
string<uri> | null

Optional public HTTP(S) endpoint that receives a POST when the task becomes finished or failed. HTTPS is recommended. Omit it, or send null or an empty string, to disable callbacks.

Example:

"https://your-domain.com/callback"

Response

Task submitted

code
enum<integer>
required

HTTP status code.

Available options:
200
data
object
required