Credits & Billing
Prepaid credits, topping up, automatic top-ups, low-credit emails, invoices, the balance API, per-key budgets, and the hard stop at zero.
You buy prepaid credits. Requests debit them exactly. When the balance reaches zero, requests stop. There is no overage and no end-of-month invoice. Every charge can be recomputed from the rate card and each response's usage object.
Where billing lives#
Team admins use the billing page to add credits and change payment details. Members see the shared balance on the usage page. Only admins can buy credits or change the card on file.
Request receipts#
Open any row in the request log for a receipt: route, model, attempts, cached tokens, reasoning tokens, answer tokens, time to first token, throughput, and the charge priced term by term against the rate card. Uncharged requests say why instead.
The receipt carries the request's Inference-Id, the same value your client logged. Quote it to support if a receipt disagrees with your records.
Topping up#
Pick a preset or type any amount from $1 to $10,000 on the billing page, pay by card on Stripe, and you are back on the billing page with the credits on your Team as soon as the payment clears.
Auto top-off#
With a card on file, an admin can set an amount and a threshold: pick a preset or type any amount from $1, in whole cents. When the balance drops below the threshold, the card is charged and credits are added. The balance is checked every 10 minutes, so a fast burn can still reach zero between checks.
Low-credit emails#
We email you when the balance falls to 20% of your credits, or to $5 if that is more. The email goes to the Team creator by default. Under Notifications on the billing page, an admin can turn it off, change the percentage or dollar amount, or send it to any address, Team member or not. The card shows the dollar balance that triggers it. One email per crossing: after a top-up lifts the balance back above the line, the next drop warns again.
Invoices and business details#
Every credit purchase, at Checkout or by auto top-off, gets a Stripe invoice, emailed with its receipt to the billing address on file. Admins find past ones under Payment history on the billing page: every card payment, newest first, with its status, receipt and invoice. Failed and refunded payments are listed too.
An invoice shows your email only until you add business details. Under Business details on the billing page, an admin chooses Add details for invoices and enters the company name, address and VAT or other tax ID on Stripe. Edit changes them later. Details apply to future invoices only: an invoice already issued keeps the details it was issued with.
Checking your balance from the API#
Read the balance with the same key you use for inference:
balance is what the Team has left, exact to the sub-cent; requests stop when it reaches zero. total_credits is everything the Team has been granted and total_spent what the whole Team has spent. key is this key's own spend and its budget, or null without one. A Team with no limit returns null for balance and total_credits. x-api-key works in place of Authorization: Bearer, as on every other route.
Usage from the API#
List the requests a key made, with the same key:
Only the calling key's own requests come back: not a teammate's, even on the same Team. To see the whole Team, use the request log in the console. Requests come newest first. start and end take Unix seconds or an ISO 8601 time and default to the last 90 days, which is as far back as the log goes. limit is 1 to 100 (default 50), page starts at 1, and model narrows to one model. cost is in exact USD with no rounding. A failed request shows status failed, invalid, rejected or throttled with the cost it was charged, usually 0. A request appears within a few seconds of finishing.
To look up one request, pass the Inference-Id header from its response, which is also its id in the list:
It returns one request in the shape above, or 404 if this key didn't make it.
When credits run out#
Requests return 402 budget_exceeded. The code says which balance ran out, for example credits_exhausted. There is no Retry-After: add credits. Nothing is charged past your balance. The console warns as the balance runs low. Admins and the low-credit email recipient get an email at the stop, whether or not low-credit emails are on.
Key budgets#
Every key can carry its own budget: a ceiling on what that one key may spend. A budget stops a buggy key at its limit; the request that crosses the line still completes, so spend can end slightly above it.
The budget is a cap within the team's credits. The key still spends from the team balance; the budget limits how much of it that key can use.
Setting one#
On the API Keys page, enter an amount beside the key name when creating it. Leave it blank for full team-balance access. The Budget column shows what each key has left. Click it to change or clear the budget.
Budgets range from $0.01 to $100,000.