Skip to main content
Mirai Voice is prepaid. Every workspace has one INR wallet. Calls debit it when they end, text-to-speech requests debit it when they complete, and ops credits it when you top up. If the wallet cannot cover a minute, POST /v2/calls returns 402 and no call is placed. For rates and how minutes are counted, see Billing & tiers.

Get balance

200 OK
Alert on this, don’t discover itPoll the balance on a schedule (hourly is plenty) and alert your own team below a threshold that covers a day of traffic. A 402 in the middle of a campaign is a much worse way to learn you are out of credit.

List transactions

The ledger. One row per credit or debit, newest first.
200 OK
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.
Reconcile against 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.

Top up

There is no self-serve top-up yet — it is on the roadmap. Until then your Mirai contact credits the workspace; the credit appears as a credit row within minutes and takes effect immediately. Your live balance is always GET /v2/wallet, and on the Developers page of the console.

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.
Handle it explicitly — it is the one error that is a business condition rather than a bug: