1
Create a key
Open the console and go to
Developers → Create key. You get three things on the spot:
The key is shown once. We store only its SHA-256, so a lost key is rotated,
never recovered. Put both secrets in your secret manager, not in git.Rotate and revoke from the same page. Rotating issues the replacement before
it revokes the old key, so there is no window where neither works — deploy the
new one, then revoke.Check it works:
2
Create an agent
An agent is the reusable configuration a call runs: prompt, opening line,
voice, language, limits. Create it once, call it thousands of times.Keep that
- cURL
- Python
- Node.js
201 Created
id.3
Place a call
variables fill the {{placeholders}} in system_prompt and
first_message. webhook_url is where lifecycle events land.- cURL
- Python
- Node.js
202 Accepted
202 means accepted, not connected — the phone has not rung yet. Poll
GET /v2/calls/{id} or, better, wait for the
webhook.4
Receive the webhook
We POST a signed JSON event to your The final event for a connected call:96 seconds is billed as 2 minutes — ₹2.00. Minutes are whole and rounded up, with a one-minute minimum.
webhook_url at each lifecycle
transition. Verify the signature before you trust the body.- Python
- Node.js
POST https://example.com/mirai/webhook
Next
- Python?
pip install --extra-index-url https://sandbox.voice.miraiminds.co/pypi/simple mirai-voicegives you the same four requests asmirai.agents.create/mirai.calls.create, with idempotency, retries and signature verification already handled. - Webhooks — every event type, retries, replay protection.
- Calls — statuses,
ended_reason, abort, listing. - Billing & tiers — what a minute costs and what each tier can do.
- Limits — rate limits, concurrency, India calling-window rules.