Skip to main content
Credits pay for API usage, paid chat, and both studios. API pages show the USD value of your credits; studios show the same balance in credits at the current configured rate. Text models use token pricing; image models use their listed per-image or token rates.

The billing model

  • Prepaid. You buy credits; requests spend their USD value. When that balance reaches zero, requests return 402 insufficient_balance until you add credits.
  • Usage-based. Charges are rounded to six decimal places using reported tokens when available. If usage is unavailable, token estimates are used and marked with tokens_estimated in the usage history.
  • Transparent. Completed non-streaming responses report nomask.cost_usd. For streams, request stream_options.include_usage for the final usage chunk. GET /usage keeps the settled history, including billed partial streams.
  • Partial responses can be billed. Output already delivered during a stream may still be billed if it later fails or disconnects. Settled requests appear in GET /usage; operational analytics distinguish completed, interrupted and failed outcomes without storing the output.

How cost is computed

Rates per model are on the Models page and GET /models. Some models add long-context tiered pricing. Their catalog entries carry tier_threshold_tokens, usd_per_1m_input_tokens_over and usd_per_1m_output_tokens_over (all null on flat-priced models). The two sides tier independently: when prompt_tokens exceeds the threshold, the whole input is billed at the over rate, and when completion_tokens exceeds it, the whole output is billed at its over rate. A request can hit one side, both, or neither.
  • Reasoning tokens are output tokens.
  • Images sent to text models are tokenized into prompt_tokens. Generated images use the image model’s listed pricing. See Image Generation.
  • The optional NoMask system prompt adds roughly 800 input tokens when enabled.
Rates are snapshotted per request: if pricing changes later, your history still shows what each request actually cost at the time. Those full-input formulas apply when no cache discount is confirmed. For caching-enabled requests, confirmed cached input uses the applicable cached-input rate and the remaining input uses the ordinary rate. Cache-write tokens remain ordinary input; output pricing is unchanged. See Prompt Caching for the exact formula, response metadata and saved-USD coverage.

Buying credits

Open your API dashboard and click Fund next to the USD balance. Available payment methods are shown at checkout:
  • The funding window shows the current minimum purchase before you pay.
  • Crypto payments have a separate minimum, shown when you select the payment method.
  • Your credits are available the moment the payment confirms, with an emailed receipt.
  • If you return from checkout before confirmation, the payment finishes in the background within minutes.
Your credits never expire and are not refunded as cash. If you have credits from before the balance update, complete the one-time conversion to combine them with your existing USD balance. A final request may settle below zero; add credits before making another paid request.

Tracking spend

  • The overview charts daily spend by model or API key. The Caching tab tracks requests, hit rates and savings by model, with filtered CSV exports.
  • GET /usage returns settled completions with their tokens, costs, key and latency.
  • GET /balance returns the live balance; GET /me returns the calling key’s month-to-date spend.
  • Per-key monthly USD limits cap what any single key can spend; see Authentication.

Invoices and receipts

Every credit purchase appears under Payment Transactions in the app sidebar with a status and a downloadable PDF receipt. A receipt is also linked from the confirmation email, and the payment status page right after checkout shows the same record.