Skip to main content
The voice from our agents, as a standalone API. It speaks OpenAI’s POST /v1/audio/speech protocol, so every OpenAI SDK and every framework with an OpenAI TTS integration already knows how to call it — you change a base URL and a model name, not your code.

1. Get a key

Sign in to the console with your access code, open Developers, and create an API key. It is a sk_live_ secret, shown once — only its hash is stored, so a lost key is rotated, never recovered. The same key works for TTS and the rest of the v2 API.

2. First audio

The response body is the audio — --output matters, because a terminal handed 300 KB of binary is a terminal you have to reset. Play speech.wav and you have completed the integration; everything below is refinement. Two formats exist, and only two: Anything else (including OpenAI’s default mp3) is a 400 naming these two. Always send response_format explicitly.

3. Pick a voice

Currently ashu, aishe and neha — Hindi voices that code-switch through the English of real Indian speech. Each entry carries a sampleAudio URL; listen before you choose. An unknown voice is a 400, not a silent substitution. Six more languages are on the way — see the language roadmap.

4. Stream it with the OpenAI SDK

5. Drop it into your orchestrator

Frameworks with an OpenAI TTS integration need no custom code. pipecat, for example — the stock OpenAITTSService is the whole integration:
sample_rate=48000 makes pipecat log “OpenAI TTS only supports 24000Hz” at startup. Cosmetic — our audio is 48 kHz native and the frames are tagged correctly. A complete ~100-line agent (browser mic → ASR → LLM → Mirai TTS) built this way is available on request — ask on your onboarding thread.

Billing

Per character. Every response reports its own cost in headers, so you can meter spend without a second request:

When something fails

Errors use the same envelope as the rest of the API — see Errors. Stuck on something this page does not cover? Reply on your onboarding thread — a human reads it.