curl --request POST \
--url https://api.modellix.ai/api/v1/google/gemini-3.8-flash-tts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Have a wonderful day!",
"voice": "Kore"
}
'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-gemini-38-tts-001",
"model_id": "google/gemini-3.8-flash-tts",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-gemini-38-tts-001"
}
}
}{
"code": 400,
"message": "Invalid parameters: parameter 'text' is required"
}{
"code": 401,
"message": "Authentication failed: invalid API key"
}{
"code": 429,
"message": "Rate limit exceeded: 100 requests per minute, retry after 60 seconds"
}{
"code": 500,
"message": "Internal server error"
}Gemini 3.8 Flash TTS
[Core Function] Gemini 3.8 Flash TTS is Google’s controllable text-to-speech model, currently in Preview. [Strengths] Single-speaker and two-speaker dialogue, preset voices, 130 languages via language_code, and expressive delivery through turn-level style and inline vocal tags. Output is WAV (24 kHz mono PCM). [Best For] Voiceovers, audiobook narration, multilingual speech, podcast-style scripts, and two-person dialogue. [Limitations] Do NOT use this for streaming, voice creation, lip-syncing existing video, music or sound-effect generation, image or audio inputs, MP3/OGG export, or API-level speed, volume, encoding, or sample-rate controls. Dialogue requires exactly two speakers with preset voices. Combined text and style must stay within 8,192 Unicode characters. [Routing] Route here for expressive Gemini TTS with per-turn style control; for the prompt-based request format use Gemini 3.1 Flash TTS; for video with native audio use Veo.
curl --request POST \
--url https://api.modellix.ai/api/v1/google/gemini-3.8-flash-tts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Have a wonderful day!",
"voice": "Kore"
}
'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-gemini-38-tts-001",
"model_id": "google/gemini-3.8-flash-tts",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-gemini-38-tts-001"
}
}
}{
"code": 400,
"message": "Invalid parameters: parameter 'text' is required"
}{
"code": 401,
"message": "Authentication failed: invalid API key"
}{
"code": 429,
"message": "Rate limit exceeded: 100 requests per minute, retry after 60 seconds"
}{
"code": 500,
"message": "Internal server error"
}Billing
Billed in USD per million input characters. Current prices are listed on the Modellix Pricing Page.- Single speaker: Count Unicode characters in
text. - Two speakers: Sum Unicode characters in all
turns[].text, without adding separators. style, speaker names, voice names, andlanguage_codeare excluded from the character count.
Authorizations
Modellix API Key. Format: Bearer <your_api_key>
Body
Gemini 3.8 Flash TTS request. Single-speaker calls send text and voice, with optional style and language_code, and omit speakers and turns. Two-speaker calls send speakers (exactly 2) and turns, and must omit top-level text, voice, and style. style is delivery direction and is not spoken. text is the verbatim transcript. The combined text and trimmed style across the request must not exceed 8,192 Unicode characters. The 3.1 prompt field is not supported. For single-speaker synthesis, voice accepts a prebuilt name (such as Kore or Puck), an extended voice-library ID, or a voice_ / voicekey_ ID. Voice creation and management are not part of this endpoint.
Verbatim transcript for single-speaker synthesis. Required in single-speaker mode. Do not include stage directions here. Inline vocal events use angle brackets. Together with style, the request must stay within 8,192 characters.
1 - 8192"Have a wonderful day!"
Optional single-speaker delivery direction (emotion, pace, tone). Not spoken aloud. Max 8,192 characters, counted together with text.
8192"cheerful and friendly"
Optional BCP-47 language tag in lowercase. Examples: en-us, cmn-cn, ja-jp. The model can also detect the language from the transcript.
^[a-z]{2,3}(-[a-z0-9]+)*$"en-us"
Required for single-speaker synthesis. Prebuilt voice name, extended voice-library ID, or a designed/replicated voice ID (voice_... or voicekey_...). No spaces. Max 256 characters.
1 - 256"Kore"
Required for two-speaker synthesis. Exactly two speakers. Omit this field for single-speaker calls.
2 elementsShow child attributes
Show child attributes
Required for two-speaker synthesis. One object per spoken turn, in order. Each speaker must match a name in speakers, case-sensitively. All turns produce one WAV file. The sum of all turn text and trimmed style must stay within 8,192 Unicode characters.
1Show child attributes
Show child attributes
Response
Task submitted successfully. Poll GET /api/v1/tasks/{task_id} until the task completes; synthesized audio is returned on the task result.
Response code, 0 indicates success
0
Response message
"success"
Task submission details. Poll GET /api/v1/tasks/{task_id} until status is success; audio appears in result.resources with type audio and format wav.
Show child attributes
Show child attributes