POST /v2/calls returns 402 and no call
is placed.
For rates and how call time is counted — 10-second blocks, rounded up — see
Billing & tiers.
Get balance
- cURL
- Python
- Node.js
200 OK
List transactions
- cURL
- Python
- Node.js
200 OK
The call amount combines voice and insights at the voice billing block, rounds
that charge up to a paisa, then adds the separately rounded provider charge.
BYO telco,
WhatsApp and browser calls have no Mirai telco component.
kind, reference and quantity are additive. Rows written before they
existed carry no kind — read a missing kind as call. Nothing else about
the shape changed, so a reader that ignores all three keeps working.call_id: every billable call produces exactly one debit row.
A text-to-speech row
Speech requests debit the same wallet, at ₹1.80 per 1,000 characters, and only when the audio was delivered in full:reference is the X-Request-Id the speech request returned, so a row
reconciles against your request log the
way a call row reconciles against call_id.
On a WebSocket stream, each spoken sentence is its
own row, and reference is the request_id from that sentence’s audio.done
event. Fractions of a paisa carry over between sentences on a socket, so a
sentence whose share rounds to nothing has a request-log row but no wallet
row.
A flow generation row
Each AI flow draft is one debit, at the provider’s reported cost plus 20% (the chosen model’s token rates when the provider reports none):reference is the id the generation returned, and quantity is its input
and output tokens together. A generation that failed or was interrupted is
charged the same way, and its description says so, for example
Flow generation · gpt-6-sol · failed · 1,200 in / 2,400 out tokens.
A recording transcription row
Each recording transcription is one debit of the same kind, at the provider’s reported cost plus 20%:reference is the id the transcription returned, and quantity is its input
and output tokens together; the description gives the recording’s length. A
recording in which no conversation was heard is charged the same way, and its
description says so, for example
Recording transcription · gemini-3.8-flash · failed · 12s · 410 in / 96 out tokens.
Tell a transcription from a draft by its reference prefix, ftr_ or fgen_.
An offline transcription row
Each completed offline transcription is one debit withkind: "transcription", at ₹18 per hour of audio. Degraded
and failed jobs write no row.
reference is the job’s id, and quantity is the billed length in whole
seconds, rounded up. These rows are separate from the recording transcriptions
above, which turn calls into a flow and are billed as flow_generation.
Top up
Once your company has gone live, add credit yourself from the Billing page of the console, whenever you need it. Credit is spent at your workspace’s agreed rates. New T3 and T1 agreements fund their monthly minimum upfront into this wallet. Paid usage counts towards the minimum; any unused minimum is debited at the end of the billing month as amonthly_minimum transaction. The minimum is not an extra fee on top of usage.
Top-ups above it remain available. Existing agreements retain their recorded
funding terms. Before you go live, your Mirai contact credits the workspace.
Promotional offers appear as promotion credits and are used before paid
credit. They do not replace upfront monthly funding or satisfy the minimum.
The Billing page shows your promotional balance, billing period and
minimum-spend progress.
A credit appears as a credit row and takes effect immediately. Your live
balance is always GET /v2/wallet, and on the Developers page of the
console. There is no top-up endpoint in the API.
Low balance alerts
Subscribe an endpoint towallet.balance_low, wallet.depleted and
wallet.balance_restored to hear when your balance drops below an alert level
you choose (₹500 by default), when a call or campaign is refused for balance,
and when you are back above the level. payment.succeeded and
payment.failed report top-ups and failed debits. See
webhook subscriptions.
402 insufficient balance
Before dialling, we check the wallet can cover at least one minute at the
call’s tier. If it cannot:
402 Payment Required
- The gate runs pre-dial. No phone rings, nothing is charged, no call object is created.
- Retry after topping up, with the same
Idempotency-Key— the failed request did not consume it. - Calls already in flight are not killed. A call that started with credit runs to its natural end, then debits. A wallet can therefore end a busy minute slightly lower than the pre-dial check implied.
- Python
- Node.js