Gemini 3.8 Flash Text to speech
Endpoint
POST /audio/generations
Full URL: https://modelfold.ai/v1/audio/generations
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.
Input parameters for the generation task
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model to be used Default:"google/gemini-3-8-flash-tts"。 Allowed values:google/gemini-3-8-flash-tts。 Example:google/gemini-3-8-flash-tts。 |
temperature | number | No | Sampling temperature, e.g., 1 Default:1。 minimum: 0. maximum: 2. Example:1。 |
speakers | array<object> | Yes | List of speaker configurations. Each speaker uses either voice_name (preset voice) or replica (voice clone); the two are mutually exclusive. If neither is sent, the speaker defaults to Fola. |
speakers[].speaker_id | string | Yes | Speaker identifier, e.g., "Speaker 1" or "Speaker 2". Must be in "Speaker N" format. |
speakers[].voice_name | string | No | Voice name. Mutually exclusive with replica: send only one of voice_name or replica for the same speaker. Omit this field when using voice cloning. If neither this field nor replica is sent, default is Fola.70 voices grouped by use case: - Tutor: Bodi, Lumi, Sadaltager, Sola, Sulafat, Varo, Zephyr - Commercial Voiceover: Koda, Kore, Nika, Tavi, Zeno - Instructional: Algenib, Despina, Erinome, Kira, Ludo, Mako, Rasalgethi, Rina - Podcast: Alnilam, Brio, Jori, Laomedeia, Rami, Veda - Storyteller: Achird, Enzo, Riko, Sami, Zali, Zubenelgenubi - Digital Assistant: Algieba, Aoede, Autonoe, Callirrhoe, Enceladus, Gero, Iapetus, Neno, Olin, Tari, Umbriel - Call Center: Achernar, Charon, Daro, Fola, Hali, Milo, Puck - Concierge: Arlo, Cleo, Fenrir, Finn, Leda, Lora, Orus - Tech Support: Enya, Jett, Knox, Nyla, Sadachbia, Vindemiatrix - Professional: Cruz, Elio, Gacrux, Pulcherrima, Schedar, Tova, Zuri Default: "Fola"。 Allowed values:Bodi / Lumi / Sadaltager / Sola / Sulafat / Varo / Zephyr / Koda / Kore / Nika / Tavi / Zeno / Algenib / Despina / Erinome / Kira / Ludo / Mako / Rasalgethi / Rina / Alnilam / Brio / Jori / Laomedeia / Rami / Veda / Achird / Enzo / Riko / Sami / Zali / Zubenelgenubi / Algieba / Aoede / Autonoe / Callirrhoe / Enceladus / Gero / Iapetus / Neno / Olin / Tari / Umbriel / Achernar / Charon / Daro / Fola / Hali / Milo / Puck / Arlo / Cleo / Fenrir / Finn / Leda / Lora / Orus / Enya / Jett / Knox / Nyla / Sadachbia / Vindemiatrix / Cruz / Elio / Gacrux / Pulcherrima / Schedar / Tova / Zuri。 Example:Fola。 |
speakers[].replica | object | No | Voice clone settings. Gemini 3.8 only. Optional. Mutually exclusive with voice_name — do not send both on the same speaker.When set, this task temporarily clones the speaker from two recordings. The clone is not saved as a reusable voice. You can pass replica for a speaker in both single-speaker and two-speaker requests.Both recordings must be of the same adult, captured with the same microphone in the same room. AI-generated audio is rejected. WAV only. Recommended: 24kHz, mono, 16-bit PCM. Max 10MB per file. Format is detected from file content, not the extension or Content-Type. |
speakers[].replica.source_audio_url | string | Yes | URL of the reference recording. The file must be directly downloadable. Record 10–30 seconds of natural speech in a quiet space: no echo, no background music, and only one voice. Record in the language you will generate. |
speakers[].replica.consent_audio_url | string | Yes | URL of the consent recording. The file must be directly downloadable. The same person as in the reference recording must read this sentence verbatim: I am the owner of this voice and I consent to Google using this voice to create a synthetic voice model. Other supported language versions of this sentence are also accepted. Trim silence and noise at the start and end. |
filler_words | boolean | No | Whether to insert filler words in two-speaker dialogue. Off by default (omit this field); when enabled, the request includes "filler_words": true. Only takes effect when speakers has two speakers (e.g. Speaker 1 and Speaker 2). When two people are speaking, you can turn on this switch. Default:false。 Example:false。 |
dialogue_turns | array<object> | Yes | List of dialogue turns, output in sequential order |
dialogue_turns[].speaker_id | string | Yes | Corresponding speaker identifier, e.g., "Speaker 1" |
dialogue_turns[].text | string | Yes | The speaker's line. May include tone tags wrapped in English angle brackets. Example: Hello there. <laugh> That works.Official insertable tags: <argh>, <breath>, <cackle>, <cheer>, <chuckle>, <chuckles>, <cough>, <cry>, <exhales>, <gasp>, <giggle>, <groan>, <growl>, <grr>, <grunt>, <heavy breath>, <hiss>, <laugh>, <laughter>, <long pause>, <moan>, <pant>, <pff>, <phew>, <scream>, <short pause>, <shout>, <shriek>, <sigh>, <sighs>, <sneeze>, <snicker>, <snort>, <sob>, <throat-clearing>, <tsk>, <whimper>, <whispering>, <whispers>, <yawn>. maxLength: 10000. Example:Hello there. <laugh> That works.。 |
dialogue_turns[].style | string | No | Per-turn speaking style, 3.8 only. Freely describe tone, emotion, and pace; different lines from the same speaker can differ. Example: Speak like a tired night-shift radio host, slow and dry. |
Request Example
bash
curl -X POST "https://modelfold.ai/v1/audio/generations" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-3-8-flash-tts",
"speakers": [
{
"speaker_id": "Speaker 1"
}
],
"dialogue_turns": [
{
"speaker_id": "Speaker 1",
"text": "Hello there. <laugh> That works."
}
],
"temperature": 1,
"filler_words": false
}'json
{
"model": "google/gemini-3-8-flash-tts",
"speakers": [
{
"speaker_id": "Speaker 1"
}
],
"dialogue_turns": [
{
"speaker_id": "Speaker 1",
"text": "Hello there. <laugh> That works."
}
],
"temperature": 1,
"filler_words": false
}Response
200 — Generation completed. usage contains actual billing details; result URLs are illustrative.
json
{
"ok": true,
"created": 1792134000,
"data": [
{
"url": "https://modelfold.ai/uploads/outputs/result.mp3"
}
],
"usage": {}
}