gemini-3.1-flash-tts API
Use gemini-3.1-flash-tts from the Gemini TTS family via RunAPI. Per-call pricing, no subscription, and failed generations are never charged.
curl -X POST https://runapi.ai/api/v1/gemini_tts/text_to_speech \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-tts",
"text": "Generate a two-speaker podcast introduction with a calm British host and an energetic American guest."
}'
import { GeminiTtsClient } from "@runapi.ai/gemini-tts";
const client = new GeminiTtsClient();
const result = await client.textToSpeech.run({
model: "gemini-3.1-flash-tts",
text: "Generate a two-speaker podcast introduction with a calm British host and an energetic American guest.",
});
require "runapi/gemini_tts"
client = RunApi::GeminiTts::Client.new
result = client.text_to_speech.run(
model: "gemini-3.1-flash-tts",
text: "Generate a two-speaker podcast introduction with a calm British host and an energetic American guest."
)
npx skills add runapi-ai/gemini-tts -g
# Claude Code
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
# Codex
codex plugin install runapi-mcp@agents
# Cursor / Windsurf / VS Code
npx @runapi.ai/mcp init cursor
gemini-3.1-flash-tts targets the sweet spot of quality and cost within the Gemini TTS family. It shares the same API key, request shape, and async task lifecycle as every other RunAPI model — switch to this variant by changing one model ID parameter. Install the Gemini TTS skill to load docs, typed schemas, pricing notes, and setup steps into your coding workspace. Billing is metered per completed request in USD with no subscription or minimum spend, and failed generations are never charged.
- Pay-per-call pricing in USD with no subscription
- Failed generations are never charged
- Streaming when supported by the model
- Schema-validated parameters and tool calls
- Switch variant by changing one model ID parameter
- Unified billing across all models and providers
Pricing
Technical details
| Model ID | gemini-3.1-flash-tts |
| Provider | |
| Modality | audio_music |
| Task type | asynchronous |
| Billing unit | 1K tokens |
| API endpoint | /api/v1/gemini_tts/text_to_speech |
| Commercial license | Yes — included via API |
| Catalog status | Operational |
Model skill — gemini-3.1-flash-tts
Install the skill once, then use the variant ID from this page while building.
# Install the model skill for app development workflows
npx skills add runapi-ai/gemini-tts -g
Install the Gemini TTS skill for this app: 1. Add runapi-ai/gemini-tts with the skills installer. 2. Load SKILL.md in this workspace. 3. Use its docs, schemas, pricing notes, and setup steps when adding model features. 4. Confirm the install path when done.
Use gemini-3.1-flash-tts with a model skill
Install
Install the model skill for the Gemini TTS line. The skill loads docs, typed schemas, pricing notes, and setup steps into your coding workspace so your agent has the right context.
Configure
Set the model field to the full model ID shown on this page and configure your RunAPI API key as an environment variable. The same key works across all models and providers.
Call
Use the skill instructions while adding prompt, input, and callback handling to your application. RunAPI routes the request to the provider, manages the async lifecycle, and returns structured JSON.
Receive
Read the task response by polling the task ID, streaming when supported, or handling the webhook callback at your configured URL. Generated outputs are stored and retrievable by task ID.
What's different about gemini-3.1-flash-tts
Fast multi-speaker speech for responsive dialogue and high-volume audio workflows
High-fidelity multi-speaker speech with expressive control for long-form dialogue
Best for
Podcast & video scoring
Generate royalty-free background music matched to episode mood without licensing fees.
Game audio
Generate adaptive ambient soundscapes and effects for procedurally generated levels.
Ad voiceover & SFX
Generate custom voiceovers and sound effects for client spots without a recording studio.
Frequently asked questions about gemini-3.1-flash-tts
Is the model ID stable across versions?
Yes. RunAPI keeps the model ID stable and handles compatible version refreshes without changing your request shape. You do not need to update your code when the provider releases a new compatible version.
What's the rate limit on this variant?
Per-key rate limits scale with your usage tier. The pricing page shows current limits. If you need higher throughput, contact support to discuss tier upgrades.
Can I switch variants later?
Yes. Variant is a parameter in the request. Switch by changing the model ID — no code changes, no re-authentication, no separate billing setup. All variants share the same API key and request shape.
Does it stream?
Where streaming is available, RunAPI streams end-to-end. LLM models support token-level streaming. Media models use async task polling or webhook callbacks for result delivery.
Where do I report quality issues?
Open an issue on the public GitHub repo or email support at [email protected]. Include the task ID and model ID so the team can investigate the specific generation.
Do I need a separate provider account?
No. Your RunAPI API key is enough to access this variant and every other model in the catalog. You do not need accounts with the underlying provider.