BillingExplanation

How model pricing works

Per-million-token rates, separate input and output rates, and long-context tiers.

By the end: You can work out what a request will cost before sending it.

Every text model is priced per million tokens, with input and output at different rates. Image and video models are priced per generated item instead.

Input and output

Input is everything you send: system prompt, conversation history, and any attached text. Output is everything the model generates, including reasoning tokens where the provider counts them.

Long-context tiers

Some models charge more once a single request's input passes a threshold — for example above 200K input tokens. The higher rate then applies to the whole request, not just the portion above the threshold. The models page marks which models have a tier and where it begins.

Cached input

When a provider reports cached input tokens, they are billed at the provider's cached rate, which is lower. If no cached rate is published, the normal input rate applies.

Worked example

Model: $3.00 / 1M input, $15.00 / 1M output
Request: 1,200 input tokens, 800 output tokens

Input:  1,200 / 1,000,000 * $3.00  = $0.0036
Output:   800 / 1,000,000 * $15.00 = $0.0120
Total:                              $0.0156

See usage fields and metering for how those numbers are obtained from the response.