Speech

Text to speech

Turn text into natural speech with Gemini’s and ElevenLabs’ text-to-speech models, through OpenAI’s speech API: a voice you pick, and MP3, WAV or PCM back in a few seconds.

POST/v1/audio/speech
ModelIDText in, per 1M tokensAudio out, per 1M tokensAudio tokens a secondAbout a minute
Gemini 3.8 Flash TTSgemini-3.8-flash-tts$0.30$5.4025$0.008
Gemini 3.1 Flash TTSgemini-3.1-flash-tts$0.60$12.0032$0.023

ElevenLabs’ models are priced on the text alone, by the character, and the audio is included:

ModelIDPer 1K charactersAbout a minuteSpeedAudio tags
Eleven v4eleven-v4$0.10$0.085—Yes
Eleven v4 Turboeleven-v4-turbo$0.05$0.043—Yes
Eleven v3eleven-v3$0.10$0.085—Yes
Eleven Multilingual v2eleven-multilingual-v2$0.10$0.0850.7 to 1.2—
Eleven Flash v2.5eleven-flash-v2.5$0.05$0.0430.7 to 1.2—

Make speech

from openai import OpenAI
client = OpenAI(base_url="https://api.zurelay.com/v1", api_key="YOUR_ZURELAY_KEY")
speech = client.audio.speech.create(
model="gemini-3.1-flash-tts",
voice="Kore",
input="Your order has shipped and arrives on Friday.",
instructions="Say it warmly, at a relaxed pace",
)
speech.write_to_file("shipped.mp3")

Any OpenAI SDK works: point it at https://api.zurelay.com/v1 and call its speech method. The reply is the audio file itself.

An ElevenLabs model is called the same way, with one of its own voices and no instructions:

curl https://api.zurelay.com/v1/audio/speech \
-H "Authorization: Bearer $ZURELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "eleven-v4",
"voice": "Talia",
"input": "Your order has shipped and arrives on Friday."
}' -o shipped.mp3

Parameters

modelstringrequired
A speech model ID from the table.
inputstringrequired
The text to speak, up to 5,000 characters. Split longer text into several requests.
voicestring
One of the model’s voices below, or an OpenAI voice name such as alloy or nova. Default Kore on Gemini’s models and Talia on ElevenLabs’. A voice from the other lab is refused.
instructionsstring
How to say it, in plain words: Say cheerfully, Whisper, like a secret, Read slowly, like a bedtime story. Up to 2,000 characters. Not on Gemini 3.8 Flash TTS, which reads its text word for word, or on ElevenLabs’ models: a request with instructions is refused there.
response_formatstring
mp3 (the default), wav, or pcm: raw 24 kHz, 16-bit, mono samples.
speednumber
The pace, from 0.7 to 1.2, on Eleven Multilingual v2 and Eleven Flash v2.5. Eleven v4, v4 Turbo and v3 accept it but speak at their own pace. Gemini’s models accept only 1: ask for the pace in instructions instead.
modelsarray
Smart routing for this request: other speech models to try, in order, if the model is down. See Smart routing.
The audio comes back when all of it is made. Measured at full length (5,000 characters): about a minute. Give your HTTP client a timeout of 10 minutes (the OpenAI SDKs’ default), or send long text in parts.

Voices

Gemini’s models speak with these 30 voices:

VoiceSoundsVoiceSounds
ZephyrBrightPuckUpbeat
CharonInformativeKoreFirm
FenrirExcitableLedaYouthful
OrusFirmAoedeBreezy
CallirrhoeEasy-goingAutonoeBright
EnceladusBreathyIapetusClear
UmbrielEasy-goingAlgiebaSmooth
DespinaSmoothErinomeClear
AlgenibGravellyRasalgethiInformative
LaomedeiaUpbeatAchernarSoft
AlnilamFirmSchedarEven
GacruxMaturePulcherrimaForward
AchirdFriendlyZubenelgenubiCasual
VindemiatrixGentleSadachbiaLively
SadaltagerKnowledgeableSulafatWarm

Code written for OpenAI keeps working: its voice names map to a Gemini voice of a similar character.

OpenAI voiceSpeaks as
alloyKore
ashCharon
balladAlgieba
coralAoede
echoPuck
fableFenrir
novaLeda
onyxOrus
sageZephyr
shimmerCallirrhoe
verseUmbriel
marinDespina
cedarIapetus

ElevenLabs’ models speak with these 17 voices:

VoiceSoundsVoiceSounds
TaliaWarmElaraCrisp
BaxterDryEldrinBaritone
ElowenUpbeatKaelenBold
LawrenceBrightAliciaPolished
MaisieFriendlyWarrenCool
JadeNaturalEddieHelpful
CalebTrustedSawyerStoryteller
FinleyArticulateFlorenceAtmospheric
DarianGrounded

OpenAI’s voice names work on them too:

OpenAI voiceSpeaks as
alloyElowen
ashCaleb
balladBaxter
coralJade
echoLawrence
fableEldrin
novaElara
onyxSawyer
sageAlicia
shimmerFlorence
verseWarren
marinTalia
cedarEddie

Style and pacing

  • Describe the delivery the way you’d brief a voice actor: mood, pace, volume, accent.
  • Keep the direction in instructions and only the words to say in input, so the direction isn’t read out.
  • The language is picked up from the text, so a Spanish sentence is spoken in Spanish.
  • Gemini 3.8 Flash TTS takes no instructions: it reads every word of input aloud. Write Google’s vocal tags into the text where the sound belongs, such as <laugh>, <sigh>, <breath> or <short pause>.
  • ElevenLabs’ models take no instructions either. On Eleven v4, v4 Turbo and v3, write ElevenLabs’ audio tags into the text in square brackets, such as [laughs], [whispers], [sighs] or [excited]. The tags count as characters of text.

Paying for speech

ElevenLabs’ models are billed on the characters of text you send, spaces, punctuation and audio tags included, at the price per 1,000 characters in their table. The audio is included, whatever its length. A minute of speech is about 850 characters. On these models x-zurelay-input-tokens is the number of characters billed and x-zurelay-output-tokens is 0.

Gemini’s speech is billed on tokens: the text you send at the input price, and the audio you get back at the output price. Each second of audio is a set number of tokens, which the table lists for each model, so its last column is what a minute costs. Each reply says what it was billed on in its x-zurelay-input-tokens and x-zurelay-output-tokens headers, and every request is in your request log. Requests that fail cost nothing. Speech stays on the model you asked for, even with automatic smart routing. Only your own rules or a request’s models list can have another speech model answer when it’s down: x-zurelay-model names it, and it’s billed at its price.

Speech isn’t stored: save the file you get back. The same text and voice give a slightly different reading each time.

Try voices and styles in the dashboard’s Playground.

Questions, or something missing? Ask our support team and we’ll answer by email, usually within a minute.