Gemini 3.1 Flash TTS (Preview) API: Endpoint & Pricing
Gemini 3.1 Flash TTS Preview is Google’s low-latency text‑to‑speech model that generates natural, expressive speech with fine-grained control via style prompts and audio tags.
What is Gemini 3.1 Flash TTS Preview?
Gemini 3.1 Flash TTS Preview is a Google text-to-speech model that converts input text into natural-sounding audio with controllable style and delivery. It is mainly used for real-time voice experiences such as conversational assistants, interactive apps, and accessibility tools that require low-latency, high-quality speech output. It is also suited for content production workflows like audiobooks, podcasts, and voiceovers where expressive, multilingual narration is needed. The model is part of the Gemini 3.1 Flash family and succeeds earlier Gemini Flash TTS variants such as Gemini 2.5 Flash TTS.
Can you self-host Gemini 3.1 Flash TTS Preview?
No. We found no public weights for Gemini 3.1 Flash TTS Preview on Hugging Face, so there is nothing to download, quantize or serve on your own GPUs: no VRAM budget, no vLLM or GGUF build to plan for. The only way to run it is over an API.
Skip the deploy — use LLM.API as your endpoint
No GPUs, no quantization trade-offs. Same model, OpenAI-compatible, up to 30% below list price.
Providers
Different companies host the same model. OpenRouter routes your request to one of them based on the routing mode you pick — Balanced (price + speed), Nitro (fastest), or Exacto (highest tool-calling accuracy).
List price by provider
InputOutputProvider list prices; the LLM.API discount applies on top.
| Provider | Input | Output | Cache read /M | Latency | Throughput | Uptime |
|---|---|---|---|---|---|---|
| google-ai-studio | in $0; out — per 1M characters | — | — |
Prices and availability from the LLMAPI catalogue, updated nightly. Last updated 8 Oct 2026.
Try this model
Test Gemini 3.1 Flash TTS Preview right here — free to start.
Suggestions for your first prompt
Code snippet
Call the model through the OpenAI-compatible API.
Switching from OpenAI? Change 2 lines.
- base_url="https://api.openai.com/v1"
- api_key="YOUR_OPENAI_KEY"
+ base_url="https://api.llmapi.ai/v1"
+ api_key="YOUR_LLMAPI_KEY"Everything else stays the same — SDK, message format, tools, streaming. Set model to gemini-3.1-flash-tts-preview and the call runs unchanged.
curl https://api.llmapi.ai/v1/chat/completions \
-H "Authorization: Bearer $LLMAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-tts-preview",
"messages": [
{"role": "user", "content": "Give me three crisp launch checklist items."}
]
}'from openai import OpenAI
client = OpenAI(
api_key="YOUR_LLMAPI_KEY",
base_url="https://api.llmapi.ai/v1",
)
resp = client.chat.completions.create(
model="gemini-3.1-flash-tts-preview",
messages=[
{"role": "system", "content": "You are a precise product assistant."},
{"role": "user", "content": "Give me three crisp launch checklist items."},
],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LLMAPI_KEY,
baseURL: "https://api.llmapi.ai/v1",
});
const resp = await client.chat.completions.create({
model: "gemini-3.1-flash-tts-preview",
messages: [
{ role: "user", content: "Give me three crisp launch checklist items." },
],
});
console.log(resp.choices[0].message.content);stream = client.chat.completions.create(
model="gemini-3.1-flash-tts-preview",
messages=[{"role": "user", "content": "Write a haiku about latency."}],
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True){
"model": "gemini-3.1-flash-tts-preview",
"messages": [
{"role": "system", "content": "You are a precise product assistant."},
{"role": "user", "content": "Give me three crisp launch checklist items."}
]
}ENDPOINTS
Supported endpoints & features
Base URL https://api.llmapi.ai/v1 · model ID gemini-3.1-flash-tts-preview · OpenAI-compatible.
POST /v1/chat/completionsChat Completions — supported
| Feature | Status | How to set it |
|---|---|---|
| Function calling (tools) | Not supported | tools, tool_choice |
| Parallel tool calls | Not supported | parallel_tool_calls |
| JSON mode | Supported | response_format: {"type": "json_object"} |
| Structured outputs | Not supported | response_format: {"type": "json_schema", …} |
| Streaming | Not supported | stream: true |
| Vision (image input) | Not supported | image_url content parts |
| Web search | Not supported | web_search |
ERRORS
Errors & fallback routing
| Code | What it means | What to do |
|---|---|---|
401 | Missing or invalid API key. | Send Authorization: Bearer YOUR_LLMAPI_KEY and check the key is active. |
429 | Rate limited, or the upstream provider is throttling the request. | Back off and retry with jitter; the gateway also retries the request on another provider where one is available. |
5xx | Upstream provider error or timeout. | Retry; fallback routing sends the retry to the next healthy provider for this model. |
When a provider fails or throttles, the request is routed to the next provider serving this model — the ones listed in the providers table above.
Uptime
Last 30 days
30/30 days operational | 100.00% uptime
Gemini 3.1 Flash TTS (Preview) in production
What the model is good at.
-
Conversational TTS
Generates natural, conversational speech audio from text prompts, suitable for interactive agents and real-time spoken dialogue applications.
-
Multilingual Speech
Supports speech output in multiple languages and accents, enabling localized voice experiences across diverse global user audiences.
-
Screen Reader Output
Produces clear spoken renderings of on-screen content, assisting in accessibility scenarios like screen readers and reading aids.
-
Image Prompt Narration
Turns model-generated or provided image descriptions into spoken narration, enabling voiceover experiences for visual content pipelines.
-
Text From Images
Reads OCR-extracted text aloud from images or documents, turning recognized visual text into accessible spoken audio output.
What you get when you call Gemini 3.1 Flash TTS (Preview) through LLM.API.
-
Intelligent Model Routing
Automatically route each request to the optimal model across providers based on latency, cost, and quality so you keep one integration while strategies evolve.
One endpoint, any model. -
Cost-Aware Orchestration
Mix premium and budget models, apply dynamic caps, and analyze per-request spend so you can scale usage without surprise bills or manual tuning.
Optimize tokens, not hacks. -
Resilient Fallback Flows
Define automatic cross-provider fallbacks and retries so outages, rate limits, or timeouts degrade gracefully instead of breaking your production workloads.
Stay up when APIs don’t. -
End-to-End Observability
Trace every call across providers with logs, metrics, and latency breakdowns so you can debug incidents, tune prompts, and prove reliability to stakeholders.
See every token’s journey. -
Task-Level Abstractions
Describe tasks like chat, extraction, or generation once and let LLM.API pick the right tools and models, avoiding provider-specific boilerplate.
Think tasks, not endpoints. -
High-Throughput Batch Jobs
Send large batches across providers with automatic chunking, concurrency control, and retries so you can process millions of items without custom pipelines.
Batch at platform scale.
When to Use — When NOT to Use
Use it if...
- You need fast, low-cost text-to-speech for interactive apps, games, or chatbots.
- Your use case involves prototyping voice features and you can tolerate preview-level stability.
- You need to generate spoken feedback or instructions from short text prompts on-demand.
- Your use case involves turning UI messages or notifications into natural-sounding speech quickly.
- You need a cloud TTS service that integrates easily with other Gemini-family models.
- Your use case involves adding basic voice output to existing web or mobile workflows.
Avoid if...
- You need a fully production-hardened TTS service with strong long-term backward compatibility guarantees.
- Your workload requires strict enterprise compliance certifications or audited data-handling guarantees today.
- You need ultra-low-latency, on-device text-to-speech where cloud round-trips are unacceptable.
- Your workload requires fine-grained control over phonemes, prosody, or custom voice cloning.
- You need guaranteed stable pricing, quotas, and SLAs beyond typical preview-stage offerings.
- Your workload requires multilingual TTS coverage beyond the languages currently supported in preview.
COMMUNITY
What developers say about Gemini 3.1 Flash TTS Preview
Summarised from public developer discussions and write-ups. Opinions are the sources’, not LLM.API’s.
- Developers on Simon Willison's blog report successful experimentation with the model's high steerability, noting its ability to follow complex natural-language "director's notes" and specific regional accent instructions.
- Developers on Nipun Batra's blog observe that the model's new bracketed "audio tags" allow for granular, inline control over delivery style and emotion without needing separate voice configuration schemas.
- Analysis from ChatForest highlights that while the model is excellent for LLM-native workflows, it lacks support for the bidirectional Live API, making it unsuitable for unstructured real-time voice assistants.
SOURCES
Frequently Asked Questions
-
What is Gemini 3.1 Flash TTS Preview?
Gemini 3.1 Flash TTS Preview is a Google model that converts text into speech with a focus on low latency and efficient generation.
-
What is Gemini 3.1 Flash TTS Preview best suited for?
It is best for real-time or near-real-time text-to-speech use cases like voice responses, assistants, and interactive applications where speed matters.
-
Which modalities does Gemini 3.1 Flash TTS Preview support via LLM.API?
Through LLM.API, Gemini 3.1 Flash TTS Preview takes text as input and returns generated audio as output.
-
How fast is Gemini 3.1 Flash TTS Preview in terms of latency?
It is optimized for low latency streaming-style speech generation, making it suitable for responsive conversational experiences.
-
What context window or input length limits apply to Gemini 3.1 Flash TTS Preview?
The model accepts typical TTS-length prompts; very long texts should be chunked by the client before sending for synthesis.
-
How is Gemini 3.1 Flash TTS Preview priced on LLM.API?
Pricing is usage-based on characters or tokens of text-to-speech generation; check your LLM.API dashboard or pricing page for current rates.
-
How do I call Gemini 3.1 Flash TTS Preview through LLM.API?
You select the model name in the LLM.API request and send text input, receiving audio bytes or a URL depending on your integration options.
-
How does Gemini 3.1 Flash TTS Preview compare to non-Flash Gemini models?
Compared to larger, general-purpose Gemini models, it trades broad multimodal reasoning for faster, more efficient text-to-speech generation.
-
What are the main limitations of Gemini 3.1 Flash TTS Preview?
It focuses on speech synthesis only, so it does not perform general reasoning, code generation, or image understanding tasks.
-
Can I fine-tune Gemini 3.1 Flash TTS Preview via LLM.API?
Fine-tuning is not available; you use the base Google-provided TTS voices and control style primarily via prompt parameters.
COMPARE
Competitive Models
Gemini 2.5 Pro Preview TTS
$4 in / — out per 1M characters, context varies — the closest current alternative to Gemini 3.1 Flash TTS (Preview).
Deepgram Aura 2
$30 in / — out per 1M characters, context varies — the closest current alternative to Gemini 3.1 Flash TTS (Preview).
Cartesia Sonic 3
$65 in / — out per 1M characters, context varies — the closest current alternative to Gemini 3.1 Flash TTS (Preview).
Gemini 3.5 Flash is Google’s natively multimodal reasoning model optimized for very low latency and cost while maintaining frontier‑level performance, particularly for coding and agentic workflows.
Nano Banana Pro (Gemini 3 Pro Image Preview)
Nano Banana Pro (Gemini 3 Pro Image Preview) is Google’s preview-stage image generation and editing model built on the Gemini 3 Pro family, optimized for complex, multi-turn visual creation tasks.
Gemini 3 Flash Preview
Gemini 3 Flash Preview is a Google multimodal large language model optimized for high speed and cost‑effective performance in complex reasoning tasks. It offers long‑context understanding and strong support for agents, coding, and retrieval‑augmented applications.
Get one key to every model
Swap your API key. Keep your code.