Skip to main content
Our voice agents speak with Mira TTS and listen with Mira STT, our own speech recognition. You can call both directly. Each model answers over HTTP for one request and over a WebSocket for live audio.

Endpoints

Both HTTP routes take the same requests as OpenAI’s audio API, so an OpenAI SDK works once you change base_url and api_key. GET /v1/models lists both models. Every answer carries X-Request-Id, errors share one envelope, and each model keeps a request log you can read: GET /v2/tts/requests and GET /v2/stt/requests.

Languages and prices

Text to speech has two prices: by the character over HTTP, by the minute on the socket, where the speech itself is not charged again. Speech to text costs the same on both. All prices exclude GST. Every model API is in one table under Billing and tiers.

Availability

Both APIs are available around the clock, every day of the week. If we ever take them down for planned maintenance, they refuse new work with 503 maintenance_window and a Retry-After header that gives the seconds until they are back. A refused request costs nothing, so retry once Retry-After has passed. Treat it like any other 503: the retry pattern already covers it. For speech to text, the HTTP route, the socket and the browser token mint all answer this way. For text to speech, the HTTP route answers this way. A text to speech socket is either refused when it connects or, if it is already open, gets an error event with this code and retry_after_secs for each sentence.

First request

Speak a line into a file, then transcribe that file:
The second command prints the transcript and its language as JSON, {"text": "…", "language": "hi-IN"}. Send language=auto instead when you don’t know the language; see STT languages.

Pipecat

Put them where your STT and TTS services were. See Pipecat.

Next

TTS quickstart

Voices, formats, streaming and phone audio.

STT quickstart

One clip over HTTP, then live audio over a socket.

Compatibility

Other URLs, browser tokens, and moving from Sarvam.