More

Billing

How usage is priced, how to add credits and how to review charges.

How usage is priced

You pay for the tokens each request actually uses. Input, output and cached input are priced separately. Per-model rates are on the Pricing page.

Formula
cost = uncached input tokens × input price
     + cached input tokens   × cached input price
     + output tokens         × output price

Prices are in US dollars per million tokens. For reasoning models, tokens produced while reasoning are billed at the output price.

Adding credits

  1. Purchase a top-up code.
  2. Sign in to the console and open Wallet.
  3. Enter the code and redeem it. Credits are added immediately.

When credits run out

When your credits or a key’s limit are used up, requests return 402 with insufficient_quota. Nothing further is charged and you are never billed in arrears.

Reviewing charges

Usage Logs in the console lists every request with its time, model, input and output tokens and cost. You can filter by time and model and export the results.

Redeemed credits cannot be withdrawn.