Billing & credits
Prepaid credits, holds and settlement.
Prepaid credits
You pay for usage from a prepaid USD balance. Buy credits on the Credits page with a card. A platform fee of 5.50% (rounded up to the next cent) is added on top and shown before you pay. For example, $25.00 of credits costs $26.38 ($1.38 fee). Buy $5.00–$10,000.00 at a time. Your first purchase can be up to $100.00, purchases are limited to $500.00 per 24 hours (fee included), and you can start up to 5 checkouts per hour. Contact support to raise the daily limit.
Prices exclude taxes and we do not currently charge tax at checkout; you are responsible for any taxes due where you are (for example, reverse charge). A VAT or tax ID entered at checkout appears on your receipt.
Credits are added when the payment processor confirms the payment. Each payment is credited exactly once, even if the confirmation is delivered more than once.
How a request is priced
Each model lists prices per 1M tokens. A request costs:
ceil(((prompt − cached) × input + cached × cache_read + completion × output) ÷ 1,000,000) micro-dollars
where cache_read falls back to the input price for models without one. Reasoning tokens count as completion tokens. The result is returned as usage.cost.
No charge on failure
A request that fails before any output costs nothing. That covers every way a request can fail:
- every route for the model failed (503
upstream_error), timed out (408timeout) or is at capacity (429model_capacity); - the model rejected the request (400
invalid_request), or a balance, key or rate limit refused it (402, 429); - you cancelled the request before the first token arrived.
Retries are on us too: within one request we fail over between routes before any output reaches you, and the attempts that failed are never billed.
If a stream breaks after output started (the upstream connection drops or the model errors mid-stream), you pay for the prompt and the output that reached you, and nothing more. We charge the token counts the provider reported; if it reported none, we estimate them from your prompt and the text streamed so far (about four characters per token). The charge is never more than the request's hold. The error arrives in the stream (see Errors mid-stream), followed by the usage chunk with the exact cost.
You can check any request: every response carries usage.cost, and GET /generation?id=gen-… and the Activity page show its status and what it cost ($0 for a failed request).
Holds, then settlement
- Hold. Before calling the model we reserve the request's maximum possible cost: a deliberately high estimate of the prompt tokens plus the largest possible output (the smallest of your
max_tokens, the model's max output and the context left after the prompt). Streaming requests reserve less: the prompt plus the first 8,192 output tokens, and the hold grows as output arrives. If your balance (or one of the key's limits) can't cover more, the stream ends with aninsufficient_credits(orkey_limit_exceeded) error event and you pay only for the output already sent. - Run. Holds reduce your available balance (balance minus holds) while requests run, so parallel requests cannot overspend.
- Settle. When the request finishes, the hold is released and the actual cost is charged. Each charge is written to your ledger with the balance after it.
insufficient_credits with money still in your account? A non-streaming request with no max_tokens holds the model's full output limit. Stream the response (the hold then grows as you go), or set max_tokens to what you actually need and the hold shrinks accordingly.Ledger and reconciliation
Every balance change — purchase, usage, refund or adjustment — is a ledger entry carrying the resulting balance. You can see them on the Credits page and export request-level costs from Activity. Your balance can never go negative.
Budgets per key
Give each app or agent its own key with a daily or monthly spending limit (UTC). Limits work with holds, like your balance, so a key never spends past its limit; see Key controls.
Price ceiling per request
Send "max_price": {"prompt": 1, "completion": 4} (USD per 1M tokens; OpenRouter's provider.max_price works too) and a model priced above it is refused with 400 max_price_exceeded before anything is reserved. Nothing is charged.
Usage API
Both endpoints take your API key and return metadata only, never prompts or outputs.
GET /usage?group_by=day|model&from=YYYY-MM-DD&to=YYYY-MM-DD: requests, tokens and cost per UTC day or per model, plus atotal. It covers the calling key by default; addscope=accountfor the whole account.fromandtoare both included and default to the last 30 days. A request counts on the day it finished, the same day as the key's daily spend.GET /generations?limit=20&before=gen-…: your newest requests first (up to 100 per page) with model, status, tokens, cost, latency and client app. Passnext_beforeasbeforefor the next page;scope=accountworks here too.
When the upstream does not report usage
If an upstream provider does not return token counts, the request is billed on an estimate and flagged for review on our side. The estimate counts all output that reached you, reasoning included: a stream you close while the model is still reasoning is billed for the reasoning already sent.