Gemini

Gemini 3.1 Flash TTS

Audio
Not available
Generate Now

Gemini 3.1 Flash text-to-speech. Fast, natural-sounding voice synthesis.

Type
Text to Audio
Billed
per 1K chars
Provider
Google

Pricing

/ 1K chars
Price$0.04 / 1K chars

Supported parameters

modelSettings
  • Promptprompt
  • Voicevoice

Code examples

POST /v1/generations

Generations are async — the request returns immediately with an id; poll for the result.

python
import requests

response = requests.post(
    "https://api.modelstack.cc/v1/generations",
    headers={"Authorization": "Bearer sk_YOUR_API_KEY"},
    json={
        "type": "TEXT_TO_AUDIO",
        "prompt": "A serene mountain landscape at sunset",
        "model": "google/gemini-tts-3-1-flash",
        "modelSettings": {
            "voice": "Rachel"
        }
    },
)
generation_id = response.json()["data"]["id"]

# Poll for the result
result = requests.get(
    f"https://api.modelstack.cc/v1/generations/{generation_id}",
    headers={"Authorization": "Bearer sk_YOUR_API_KEY"},
).json()
print(result["data"]["status"])

Related models

Frequently asked questions

How is Gemini 3.1 Flash TTS billed on ModelStack?expand_more
Gemini 3.1 Flash TTS (Text to Audio) is billed at a flat, prepaid rate of $0.04 / 1K chars — generation pricing has no tier-based discounts. Final request costs are available in the console.
Which parameters does Gemini 3.1 Flash TTS support?expand_more
Gemini 3.1 Flash TTS supports: Prompt, Voice.
How can I generate with Gemini 3.1 Flash TTS?expand_more
Use the Generate composer in your dashboard, or call the API directly with model `google/gemini-tts-3-1-flash` and type `TEXT_TO_AUDIO` — see the code example above.