← All models
Details
- Accepts
- text
Pricing
- Input
- 125 cr / 1M tokens
- Output
- 2500 cr / 1M tokens
Prices in credits (1 credit = $0.01).
Data schema
Input
| Field | Type | Description |
|---|---|---|
| voice | stringenum: Achernar, Achird, Algenib, Algieba, Alnilam, Aoede… | Voice preset for single-speaker synthesis. 30 distinct voices are available. Ignored when speakers is set. Popular choices: Kore (strong, firm female), Puck (upbeat, lively male), Charon (calm, professional male), Zephyr (bright, clear female), Aoede (warm, melodic female). |
| promptrequired | string | The text to convert to speech. Gemini 3.1 Flash TTS supports natural-language prompting for style, pace, accent, and emotional expression — include delivery instructions inline with the text (e.g. 'Say cheerfully: Have a wonderful day!'). Supports expressive audio tags like [sigh], [laughing], [whis… |
| speakers | — | Multi-speaker voice configuration. When set, enables multi-speaker synthesis where different parts of the text are spoken by different voices. Each speaker needs a voice and a speaker_id (alias) that matches prefixes in the prompt. |
| temperature | number | Controls the randomness of the speech output. Higher values produce more creative and varied delivery, while lower values make the output more predictable and focused. |
| language_code | — | Language for multilingual synthesis. When set, steers the model to speak in the specified language. If not set, the model auto-detects the language from the text. |
| output_format | stringenum: wav, mp3, ogg_opus | Audio output format. mp3: compressed, small file size (recommended). wav: uncompressed PCM wrapped in WAV (24 kHz, 16-bit mono). ogg_opus: Ogg container with Opus codec, good quality-to-size ratio. |
| style_instructions | — | Optional style and delivery instructions prepended to the prompt. Controls expressiveness, accent, pace, tone, and emotional expression using natural language. Use this to separate style control from the text content. Examples: 'Speak warmly and slowly', 'Read this as a dramatic newscast', 'Use a Br… |
Output
| Field | Type | Description |
|---|---|---|
| audio | — | The generated audio file. |