The billing model
- Prepaid. You buy credits; requests spend their USD value. When that balance reaches zero, requests return
402 insufficient_balanceuntil 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_estimatedin the usage history. - Transparent. Completed non-streaming responses report
nomask.cost_usd. For streams, requeststream_options.include_usagefor the final usage chunk.GET /usagekeeps 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
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.
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 /usagereturns settled completions with their tokens, costs, key and latency.GET /balancereturns the live balance;GET /mereturns the calling key’s month-to-date spend.- Per-key monthly USD limits cap what any single key can spend; see Authentication.