Your first API call takes five minutes, and one key reaches every API.
One API key gives you speech to text in 10 Indian languages, text to speech in nine, and a language model. Speech to text is ₹0.30 a minute; text to speech ₹1.80 per 1,000 characters.
No sign-up to look around. Your sandbox starts with ₹200 of credit.
POST /v1/audio/speech Mira TTS
curl https://sandbox.voice.miraiminds.co/v1/audio/speech \ -H "Authorization: Bearer $MIRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "mira-tts", "voice": "anjali", "response_format": "wav", "input": "नमस्ते, मैं अंजलि बोल रही हूँ। आपका order कल शाम तक पहुँच जाएगा।" }' \ --output speech.wav 200 OKaudio/wav, saved as speech.wav
POST /v1/audio/transcriptions Mira STT
curl https://sandbox.voice.miraiminds.co/v1/audio/transcriptions \ -H "Authorization: Bearer $MIRA_API_KEY" \ -F file=@call.wav \ -F language=gu-IN \ -F model=mira-stt 200 OK
{ "text": "નમસ્તે મારે કાલે સાંજે પાંચ વાગ્યાની appointment બુક કરવી છે", "language": "gu-IN" } POST /v2/chat/completions Mira LLM
curl https://sandbox.voice.miraiminds.co/v2/chat/completions \ -H "Authorization: Bearer $MIRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "mira-llm", "messages": [ {"role": "system", "content": "You are a support agent for an online grocery store. Reply in the mix of Hindi and English the customer uses. Keep it to three sentences."}, {"role": "user", "content": "भाई मेरा order अभी तक नहीं आया, कल delivery date था. अब कहाँ tak pahuncha hai?"} ], "temperature": 0.3, "max_tokens": 200 }' 200 OK
{ "model": "mira-llm", "choices": [{ "message": { "role": "assistant", "content": "Sorry sir, delay के लिए माफ़ी. मैं अभी check कर लेता हूँ — आप order number बता दीजिए. उसके बाद exact status और नई delivery date दोनों बता दूंगा." }, "finish_reason": "stop" }], "usage": { "prompt_tokens": 98, "completion_tokens": 52, "total_tokens": 150 }} POST /v2/calls An agent on a phone call
curl -X POST https://sandbox.voice.miraiminds.co/v2/calls \ -H "Authorization: Bearer $MIRA_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: order-8842-confirm-1" \ -d '{ "agent_id": "agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ", "to": "+919876543210", "variables": { "customer_name": "Rahul", "order_id": "8842" }, "webhook_url": "https://example.com/mirai/webhook" }' 202 Accepted
{ "id": "call_01JZQ9B4M8N3P6R2S5T7V9W1YA", "status": "queued" } Your first call is three steps of real code, and it takes about five minutes.
Open the quickstartBefore you startFirst, create a key in the sandbox: Developers, then Create key. It starts with ₹200 of real calls.
curl https://sandbox.voice.miraiminds.co/v2/wallet -H "Authorization: Bearer $MIRA_API_KEY" 200 OK
{ "balance_inr": 200, "currency": "INR", "updated_at": "2026-07-26T09:12:44Z" } -
Create an agent
The prompt, the opening line, the voice and the language, saved once and used for every call.
POST
/v2/agentscurl -X POST https://sandbox.voice.miraiminds.co/v2/agents \ -H "Authorization: Bearer $MIRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Order Confirmation", "system_prompt": "You are Anjali from Kesar Kurta House. Confirm order {{order_id}} with {{customer_name}} and ask whether the delivery address is unchanged. Keep replies to one or two short sentences. When the customer is done, thank them and end the call.", "first_message": "नमस्ते {{customer_name}}, मैं Kesar Kurta House से Anjali बोल रही हूँ।", "voice": { "voice_id": "anjali", "language": "hi-IN" }, "language": "hi-IN", "max_duration_secs": 300 }'201 Created
{ "id": "agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ", "object": "agent", "name": "Order Confirmation", "voice": { "voice_id": "anjali", "language": "hi-IN" }, "language": "hi-IN", "max_duration_secs": 300, "created_at": "2026-07-26T09:14:02Z"}POST
/v2/agentsimport os, httpxAPI = "https://sandbox.voice.miraiminds.co"auth = {"Authorization": f"Bearer {os.environ['MIRAI_API_KEY']}"}agent = httpx.post( f"{API}/v2/agents", headers=auth, json={ "name": "Order Confirmation", "system_prompt": ( "You are Anjali from Kesar Kurta House. Confirm order {{order_id}} with " "{{customer_name}} and ask whether the delivery address is " "unchanged. Keep replies to one or two short sentences. When " "the customer is done, thank them and end the call." ), "first_message": "नमस्ते {{customer_name}}, मैं Kesar Kurta House से Anjali बोल रही हूँ।", "voice": {"voice_id": "anjali", "language": "hi-IN"}, "language": "hi-IN", "max_duration_secs": 300, }, timeout=30,).raise_for_status().json()print(agent["id"]) # agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ201 Created
{ "id": "agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ", "object": "agent", "name": "Order Confirmation", "voice": { "voice_id": "anjali", "language": "hi-IN" }, "language": "hi-IN", "max_duration_secs": 300, "created_at": "2026-07-26T09:14:02Z"}POST
/v2/agentsconst API = "https://sandbox.voice.miraiminds.co";const auth = { Authorization: `Bearer ${process.env.MIRAI_API_KEY}` };const res = await fetch(`${API}/v2/agents`, { method: "POST", headers: { ...auth, "Content-Type": "application/json" }, body: JSON.stringify({ name: "Order Confirmation", system_prompt: "You are Anjali from Kesar Kurta House. Confirm order {{order_id}} with {{customer_name}} " + "and ask whether the delivery address is unchanged. Keep replies to one or " + "two short sentences. When the customer is done, thank them and end the call.", first_message: "नमस्ते {{customer_name}}, मैं Kesar Kurta House से Anjali बोल रही हूँ।", voice: { voice_id: "anjali", language: "hi-IN" }, language: "hi-IN", max_duration_secs: 300, }),});if (!res.ok) throw new Error(JSON.stringify(await res.json()));const agent = await res.json();console.log(agent.id); // agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ201 Created
{ "id": "agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ", "object": "agent", "name": "Order Confirmation", "voice": { "voice_id": "anjali", "language": "hi-IN" }, "language": "hi-IN", "max_duration_secs": 300, "created_at": "2026-07-26T09:14:02Z"} -
Place a call
The variables fill the prompt’s placeholders. 202 means the call is accepted; the phone rings next.
POST
/v2/callscurl -X POST https://sandbox.voice.miraiminds.co/v2/calls \ -H "Authorization: Bearer $MIRA_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: order-8842-confirm-1" \ -d '{ "agent_id": "agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ", "to": "+919876543210", "variables": { "customer_name": "Rahul", "order_id": "8842" }, "webhook_url": "https://example.com/mirai/webhook" }'202 Accepted
{ "id": "call_01JZQ9B4M8N3P6R2S5T7V9W1YA", "status": "queued" }POST
/v2/callscall = httpx.post( f"{API}/v2/calls", headers={**auth, "Idempotency-Key": "order-8842-confirm-1"}, json={ "agent_id": "agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ", "to": "+919876543210", "variables": {"customer_name": "Rahul", "order_id": "8842"}, "webhook_url": "https://example.com/mirai/webhook", }, timeout=30,).raise_for_status().json()print(call["id"], call["status"]) # call_01JZQ9B4M8N3P6R2S5T7V9W1YA queued202 Accepted
{ "id": "call_01JZQ9B4M8N3P6R2S5T7V9W1YA", "status": "queued" }POST
/v2/callsconst res = await fetch(`${API}/v2/calls`, { method: "POST", headers: { ...auth, "Content-Type": "application/json", "Idempotency-Key": "order-8842-confirm-1", }, body: JSON.stringify({ agent_id: "agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ", to: "+919876543210", variables: { customer_name: "Rahul", order_id: "8842" }, webhook_url: "https://example.com/mirai/webhook", }),});const call = await res.json();console.log(call.id, call.status); // call_01JZQ9B4M8N3P6R2S5T7V9W1YA queued202 Accepted
{ "id": "call_01JZQ9B4M8N3P6R2S5T7V9W1YA", "status": "queued" } -
Receive the webhook
We POST a signed event at each step of the call. Verify the signature, then read the result: 96 seconds, billed as 10 blocks.
POST
https://example.com/mirai/webhookimport hmac, hashlib, timefrom flask import Flask, requestapp = Flask(__name__)WHSEC = "whsec_7d4f1a09c2e58b36a1f0d7c93b2e64a8"TOLERANCE_SECS = 300def verify(raw_body: bytes, header: str, secret: str) -> bool: parts = dict(p.split("=", 1) for p in header.split(",") if "=" in p) t, v1 = parts.get("t"), parts.get("v1") if not t or not v1: return False if abs(time.time() - int(t)) > TOLERANCE_SECS: return False expected = hmac.new( secret.encode(), t.encode() + b"." + raw_body, hashlib.sha256 ).hexdigest() return hmac.compare_digest(expected, v1)@app.post("/mirai/webhook")def hook(): if not verify(request.get_data(), request.headers.get("X-Mirai-Signature", ""), WHSEC): return "", 401 event = request.get_json() print(event["type"], event["data"]["call"]["status"]) return "", 200 # 2xx stops our retriescall.completedthe event your server receives
{ "id": "evt_01JZQ9C5N9P4R7S3T6V8W2X4YB", "type": "call.completed", "created_at": "2026-07-26T09:16:38Z", "data": { "call": { "id": "call_01JZQ9B4M8N3P6R2S5T7V9W1YA", "object": "call", "agent_id": "agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ", "to": "+919876543210", "status": "completed", "ended_reason": "assistant-ended-call", "started_at": "2026-07-26T09:15:02Z", "ended_at": "2026-07-26T09:16:38Z", "duration_secs": 96, "cost": { "amount_inr": 8.34, "per_min_inr": 5, "billing_block_secs": 10 } }, "wallet": { "balance_inr": 191.66 } }}POST
https://example.com/mirai/webhookimport express from "express";import crypto from "node:crypto";const app = express();const WHSEC = "whsec_7d4f1a09c2e58b36a1f0d7c93b2e64a8";const TOLERANCE_SECS = 300;function verify(rawBody, header, secret) { const parts = Object.fromEntries( header.split(",").map((p) => { const i = p.indexOf("="); return [p.slice(0, i).trim(), p.slice(i + 1).trim()]; }) ); const { t, v1 } = parts; if (!t || !v1) return false; if (Math.abs(Date.now() / 1000 - Number(t)) > TOLERANCE_SECS) return false; const expected = crypto .createHmac("sha256", secret) .update(`${t}.`) .update(rawBody) .digest("hex"); const a = Buffer.from(expected, "utf8"); const b = Buffer.from(v1, "utf8"); return a.length === b.length && crypto.timingSafeEqual(a, b);}// raw body is required: a re-serialized JSON object will not matchapp.post("/mirai/webhook", express.raw({ type: "application/json" }), (req, res) => { if (!verify(req.body, req.get("X-Mirai-Signature") ?? "", WHSEC)) { return res.sendStatus(401); } const event = JSON.parse(req.body.toString("utf8")); console.log(event.type, event.data.call.status); res.sendStatus(200); // 2xx stops our retries});app.listen(3000);call.completedthe event your server receives
{ "id": "evt_01JZQ9C5N9P4R7S3T6V8W2X4YB", "type": "call.completed", "created_at": "2026-07-26T09:16:38Z", "data": { "call": { "id": "call_01JZQ9B4M8N3P6R2S5T7V9W1YA", "object": "call", "agent_id": "agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ", "to": "+919876543210", "status": "completed", "ended_reason": "assistant-ended-call", "started_at": "2026-07-26T09:15:02Z", "ended_at": "2026-07-26T09:16:38Z", "duration_secs": 96, "cost": { "amount_inr": 8.34, "per_min_inr": 5, "billing_block_secs": 10 } }, "wallet": { "balance_inr": 191.66 } }}
One key reaches the whole platform, from one sentence to a whole campaign.
Open the API referenceOne key
Authorization: Bearersk_live_…
One prepaid wallet, in rupees
- Sandbox
- sandbox.voice.miraiminds.co
- Production
- prod.voice.miraiminds.co
Speech and the modelOpenAI-compatible
- Mira TTSText to speech
POST
/v1WSS/audio /speech /v1/audio /speech /stream - Mira STTSpeech to text
POST
/v1WSS/audio /transcriptions /v1POST/audio /transcriptions /stream /v2/transcriptions - Mira LLMLanguage model
POST
/v2/chat /completions
The agent platform188 operations in the reference
- Agents
/v2/agentsThe prompt, voice and tools a call runs
18 operations
- Calls
/v2/callsPlace a call; read its transcript, recording and analysis
16 operations
- Campaigns
/v2/campaignsDial a list with calling hours, retries and a budget
25 operations
- Webhooks
/v2/webhooksSigned events, destinations, deliveries and retries
22 operations
- Telephony
/v2/telephonyRent Indian numbers, or connect your own
23 operations
- Sub-workspaces
/v2/workspacesA workspace for each brand, one wallet
9 operations
- Do-not-call
/v2/dncYour suppression list, checked at dial time
4 operations
- Wallet
/v2/walletThe balance and every charge
4 operations
Back to your serverX-Mirai-Signature
call.startedcall.completedcall.processedcall.failedcampaign.completed Every event
Counts are the operations in the published API reference on 30 Nov 2026 (188 in all, in 21 groups). The routes are the same on both base URLs; a sandbox key works only on the sandbox.
A reply starts in about 850 ms end to end, and each stage is timed in production.
See the modelsWhat happens in 850 ms
One reply on a live call, from the caller’s last word to the first sound of the answer.
It plugs into the stack you already run, with one package or one base URL.
- Pipecat (docs, opens in a new tab) MiraiTTSService and MiraiSTTService in your pipeline.
uv add pipecat-mirai - LiveKit Agents (docs, opens in a new tab) Through LiveKit’s OpenAI plugin, with one sample-rate setting.
base_url="…/v1", model="mira-tts" - OpenAI SDKs (docs, opens in a new tab) Speech, transcription and chat with a new base URL and model name.
base_url sandbox.voice.miraiminds.co/v1 - Twilio (docs, opens in a new tab) Audio in the line’s own format, 8 kHz μ-law, as it streams.
"response_format": "ulaw_8000" - Plivo (docs, opens in a new tab) Your own Plivo numbers, or any SIP trunk.
POST /v2/phone-numbers - Exotel (docs, opens in a new tab) A Pipecat transport at 8 kHz, with our service’s defaults.
MiraiTTSService(api_key=…)
Each API is priced on its own, by the minute, character and token.
See full pricingOn our own GPUs in India
POST/v1
One clip, up to 120 seconds
₹0.30a minute of audio
WSS/v1
Live audio, text while they speak
₹0.30a minute of audio
POST/v2
Recordings up to 2 hours, speakers labelled
₹15an hour of audio
POST/v1
One request, up to 2,000 characters
₹1.80per 1,000 characters
WSS/v1
Live voice, a whole call on one socket
₹0.90a minute connected
POST/v2
Input
₹15per 10,00,000 tokens
Cached input: a prompt that repeats a recent one
₹9.30per 10,00,000 tokens
Output
₹55per 10,00,000 tokens
Unused credit never expires. One key and one prepaid wallet for all of them, the wallet your calls draw on. On the text-to-speech socket you pay for the time it is open, and the speech it carries is not charged again. All prices exclude GST.
Questions developers ask before they build.
Have a question we did not answer?
Book a 15-minute call with Sneh, the founder.
Which languages do the APIs support?
Mira STT hears 10 Indian languages: Hindi, English, Gujarati, Marathi, Punjabi, Bengali, Tamil, Telugu, Kannada and Malayalam. Mira TTS speaks nine of them, all but Punjabi, and code-switches between Devanagari Hindi and Roman English in one sentence.
How is text to speech billed?
₹1.80 per 1,000 characters over HTTP, or ₹0.90 a minute the WebSocket is open, from a prepaid wallet. Pay as you go has 5 concurrent requests; Business has 25, with a ₹50,000 monthly commitment. All prices exclude GST.
Do I need to talk to sales?
No. Open the sandbox, add an email when you create a key, and start with ₹200 of credit. Talk to us when you need a dedicated endpoint or an SLA.
Does it work with the OpenAI SDK?
Yes. Mira TTS speaks OpenAI’s POST /v1/audio/speech protocol, Mira STT its POST /v1/audio/transcriptions and the language model its chat completions, so the OpenAI SDKs work with a new base URL and model name. The same key works for the rest of the v2 API.
How do I know a call has finished?
We POST a signed JSON event to your webhook URL at each step of a call. Exactly one final event arrives for every call: call.completed, call.voicemail, call.failed or call.aborted. It carries the call, what it cost and your wallet balance. Verify the X-Mirai-Signature header before you trust the body.
Is there a sandbox, and when do I move to production?
The sandbox at sandbox.voice.miraiminds.co places real calls at ₹5 a minute from ₹200 of starter credit. When your company goes live in the console you switch the base URL to prod.voice.miraiminds.co and use a production key; the routes are the same.
Get an API key with ₹200 of credit.
One key for speech, transcription and agents. ₹200 of credit to try them.
Talk with agent
Just your mic. No phone number.