LLM API
GoogleText to speechReleased April 15, 2026

Gemini 3.1 Flash TTS (Preview)

Gemini 3.1 Flash TTS (Preview) turns text into speech for $0.004 per 1K characters on LLM API.

Pricing

Served by Google AI Studio, the only provider.

Gemini 3.1 Flash TTS (Preview) prices on LLM API
Text to speech$0.004/ 1K charactersper 1K characters

Call Gemini 3.1 Flash TTS (Preview)

POST /v1/audio/speechSet LLMAPI_KEY to your LLM API key.Speech docs

import os
import wave

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

speech = client.audio.speech.create(
    model="gemini-3.1-flash-tts-preview",
    voice="Kore",
    input="Hello from LLM API",
)
with wave.open("hello.wav", "wb") as f:  # raw PCM: 24 kHz, 16-bit, mono
    f.setnchannels(1)
    f.setsampwidth(2)
    f.setframerate(24000)
    f.writeframes(speech.content)

More from Google

All Google audio models

Prices synced .

You've been invited to LLM API

Top up $50 or more and the friend who invited you gets $20 in credits. We pay the $20; your credits stay yours. Referral terms

Sign up