{"servers":[{"url":"https://api.modellix.ai/api/v1/google/gemini-3.8-flash-lite-tts"}],"post":{"description":"[Core Function] Gemini 3.8 Flash Lite TTS is Google's text-to-speech model for low-latency speech generation. [Strengths] Single-speaker synthesis, two-speaker dialogue, 101 languages, per-turn style control, and WAV output (24 kHz mono PCM). [Best For] Bulk narration, voice-agent responses, read-aloud features, and multilingual dialogue. [Limitations] Do NOT use this for streaming, voice creation, music generation, or audio, image, or video input. Dialogue requires exactly two speakers with prebuilt or extended-library voices; designed or replicated voices are limited to single-speaker synthesis. Combined text and style must stay within 8,192 Unicode characters. [Routing] Choose Flash Lite for latency and cost efficiency; choose Gemini 3.8 Flash TTS for expressive delivery and broader language coverage.","operationId":"gemini38FlashLiteTTSAsync","requestBody":{"content":{"application/json":{"examples":{"dual_speaker":{"summary":"Two-speaker dialogue, one part per turn","value":{"language_code":"en-us","speakers":[{"speaker":"Joe","voice":"Puck"},{"speaker":"Jane","voice":"Kore"}],"turns":[{"speaker":"Joe","style":"cheerful and friendly","text":"How is it going today, Jane?"},{"speaker":"Jane","style":"calm and relaxed","text":"Pretty good. Ready when you are."}]}},"single_speaker":{"summary":"Single speaker with turn style","value":{"language_code":"en-us","style":"cheerful and friendly","text":"Have a wonderful day!","voice":"Kore"}}},"schema":{"description":"Use text and voice for single-speaker synthesis, or speakers and turns for two-speaker dialogue. Dialogue requests must omit top-level text, voice, and style. Combined text and trimmed style must not exceed 8,192 Unicode characters.","properties":{"language_code":{"description":"Optional BCP-47 language tag in lowercase. Examples: en-us, cmn-cn, ja-jp. The model can also detect the language from the transcript.","example":"en-us","pattern":"^[a-z]{2,3}(-[a-z0-9]+)*$","type":"string"},"speakers":{"description":"Exactly two speakers for dialogue. Use with turns.","items":{"properties":{"speaker":{"description":"Speaker name used by turns. Alphanumeric, 1-64 characters.","example":"Joe","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9]+$","type":"string"},"voice":{"description":"Prebuilt voice name or extended voice-library ID, such as Puck or Kore. Designed or replicated voices (voice_... or voicekey_...) are not supported in dialogue. No spaces.","example":"Puck","maxLength":256,"minLength":1,"type":"string"}},"required":["speaker","voice"],"type":"object"},"maxItems":2,"minItems":2,"type":"array"},"style":{"description":"Optional delivery direction for single-speaker synthesis. Not spoken aloud.","example":"cheerful and friendly","maxLength":8192,"type":"string"},"text":{"description":"Verbatim transcript. Required for single-speaker synthesis.","example":"Have a wonderful day!","maxLength":8192,"minLength":1,"type":"string"},"turns":{"description":"Dialogue turns in order. Each speaker must match a name in speakers, case-sensitively.","items":{"properties":{"speaker":{"description":"Which configured speaker says this turn.","example":"Joe","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9]+$","type":"string"},"style":{"description":"Optional delivery direction for this turn only. Not spoken aloud.","example":"cheerful and friendly","maxLength":8192,"type":"string"},"text":{"description":"Verbatim line for this turn.","example":"How is it going today, Jane?","maxLength":8192,"minLength":1,"type":"string"}},"required":["speaker","text"],"type":"object"},"minItems":1,"type":"array"},"voice":{"description":"Required for single-speaker synthesis. Prebuilt voice name, extended voice-library ID, or a designed/replicated voice ID (voice_... or voicekey_...). No spaces.","example":"Kore","maxLength":256,"minLength":1,"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"code":0,"data":{"get_result":{"method":"GET","url":"https://api.modellix.ai/api/v1/tasks/task-gemini-38-flash-lite-tts-001"},"model_id":"google/gemini-3.8-flash-lite-tts","status":"pending","task_id":"task-gemini-38-flash-lite-tts-001"},"message":"success"},"schema":{"properties":{"code":{"description":"Response code, 0 indicates success","example":0,"type":"integer"},"data":{"description":"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.","properties":{"get_result":{"description":"Endpoint to query the task result","properties":{"method":{"example":"GET","type":"string"},"url":{"example":"https://api.modellix.ai/api/v1/tasks/task-gemini-tts-001","type":"string"}},"type":"object"},"model_id":{"description":"Model ID in provider/model format","example":"google/gemini-3.1-flash-tts","type":"string"},"status":{"description":"Initial task status","enum":["pending","processing"],"example":"pending","type":"string"},"task_id":{"description":"Unique task identifier for polling","example":"task-gemini-tts-001","type":"string"}},"required":["status","task_id","model_id"],"type":"object"},"message":{"description":"Response message","example":"success","type":"string"}},"required":["code","message","data"],"type":"object"}}},"description":"Task submitted successfully. Poll GET /api/v1/tasks/{task_id} until the task completes; synthesized audio is returned on the task result."},"400":{"content":{"application/json":{"example":{"code":400,"message":"Invalid parameters: parameter 'text' is required"},"schema":{"properties":{"code":{"description":"Error code (equals HTTP status code)","example":400,"type":"integer"},"message":{"description":"Error message in format 'Category: detail'","example":"Invalid parameters: combined prompt and text must be <= 8000 bytes","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"example":{"code":401,"message":"Authentication failed: invalid API key"},"schema":{"properties":{"code":{"description":"Error code (equals HTTP status code)","example":400,"type":"integer"},"message":{"description":"Error message in format 'Category: detail'","example":"Invalid parameters: combined prompt and text must be <= 8000 bytes","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Unauthorized - Invalid or missing API Key"},"429":{"content":{"application/json":{"example":{"code":429,"message":"Rate limit exceeded: 100 requests per minute, retry after 60 seconds"},"schema":{"properties":{"code":{"description":"Error code (equals HTTP status code)","example":400,"type":"integer"},"message":{"description":"Error message in format 'Category: detail'","example":"Invalid parameters: combined prompt and text must be <= 8000 bytes","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Too many requests - Rate limit exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum requests per minute","schema":{"example":100,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining quota in current window","schema":{"example":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Rate limit window reset time (Unix timestamp)","schema":{"example":1704067260,"type":"integer"}}}},"500":{"content":{"application/json":{"example":{"code":500,"message":"Internal server error"},"schema":{"properties":{"code":{"description":"Error code (equals HTTP status code)","example":400,"type":"integer"},"message":{"description":"Error message in format 'Category: detail'","example":"Invalid parameters: combined prompt and text must be <= 8000 bytes","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Internal server error"}},"summary":"Gemini 3.8 Flash Lite TTS","x-mint":{"content":"## Billing\n\nBilled in **USD per million input characters**. Current prices are listed on the [Modellix Pricing Page](https://www.modellix.ai/pricing).\n\n- **Single speaker:** Count Unicode characters in `text`.\n- **Two speakers:** Sum Unicode characters in all `turns[].text`, without adding separators.\n- `style`, speaker names, voice names, and `language_code` are excluded from the character count.\n","href":"google/gemini-3-8-flash-lite-tts"}}}