Billing & top-ups
How billing works
Section titled “How billing works”MirAPI is prepaid. You top up a USD balance at https://console.mirapi.ai and every request draws from it. There is no subscription, no monthly fee, and no minimum commitment, and your balance never expires — unused credit stays available until you spend it.
Top-ups are made in your local currency at the day’s exchange rate: the credited amount is recorded in USD and the rate is locked at the moment of payment. All three supported protocols — OpenAI-compatible, Anthropic, and Gemini — draw from the same balance, so a single deposit covers every endpoint you use.
Pricing units
Section titled “Pricing units”How a request is billed depends on the model’s output type:
| Output type | Billed by | Notes |
|---|---|---|
| Text and multimodal chat | Tokens | Input, output, and cache-read tokens are priced separately, per 1M tokens |
| Image generation | Image | One charge per generated image |
| Video generation | Seconds | Per second of generated video output |
Token pricing
Section titled “Token pricing”Text models charge three token tiers — input, output, and cache read — each priced in USD per million tokens. A cache-read token costs less than a fresh input token; the exact rate is on the model’s catalogue entry. Reasoning/thinking tokens are billed as output tokens. See Prompt caching to learn how to make your requests hit the cache.
Where to find prices
Section titled “Where to find prices”The catalogue is the authoritative source for pricing. GET /v1/models returns a pricing object per model with per-million-token input, output, and cache-read rates (see Models & pricing); the console shows the same figures. Always check the current price before a large run.
Note that a non-streaming response’s usage reports token counts only, never a dollar amount — the cost is recorded in the console billing log and in GET /api/log/token.
Top-ups and redemption codes
Section titled “Top-ups and redemption codes”- Top up at https://console.mirapi.ai in your local currency at the day’s rate; the credited amount is USD and the rate is locked when you pay.
- Redemption codes (for example from promotions) are entered under Billing → Redeem in the console and add USD to the same balance.
When the balance runs out
Section titled “When the balance runs out”An exhausted balance does not suspend your account. Requests fail with HTTP 403 and an error message stating that the balance is insufficient. Top up and the same key works again immediately — no re-authentication and no new key. See Errors for the full error reference.
Reconciliation
Section titled “Reconciliation”Three sources show the same billing data:
| Source | Scope |
|---|---|
| Console billing log | Per-request entries with model, channel, token counts, cost, and balance after the call |
GET /api/usage/token |
Account-level usage summary |
GET /api/log/token |
Per-request detail log, queryable by key and time range |
If you suspect a mischarge, open a ticket and include the request ID. It is appended to every error message and can be read from your own logs, and support uses it to look up the exact request and its billing entry.
Related links
Section titled “Related links”- Models & pricing — catalogue and per-model pricing
- Prompt caching — cut input costs with cache reads
- Quickstart
- FAQ
- Errors — 403 and other status codes