Models & pricing
The up-to-date list of callable models and their prices is on the Models & Pricing page, which you can open without signing in.
Open Models & Pricing To read the same prices from a script, call GET /api/account/v1/pricing with an account API key. See Account API .
Price units
| Type | Unit | Based on |
|---|---|---|
| Text · input | USD per 1M tokens | Prompt tokens reported by the provider |
| Text · output | USD per 1M tokens | Completion tokens reported by the provider |
| Cache read / write | USD per 1M tokens | Cache tokens reported by the provider, if the model supports caching |
| Embedding | USD per 1M tokens | Embedding input tokens |
| Image | USD per image | Number of images produced |
| Video | USD per second | Video duration, metered per millisecond |
How the cost is calculated
For text models, the four components are added up exactly and rounded up once to the smallest unit, $0.000000001 (one nano-dollar). There is no per-component rounding and no minimum charge.
Formula
cost = ⌈ ( input × input_rate + output × output_rate + cache_read × cache_read_rate + cache_write × cache_write_rate ) / 1,000,000 ⌉example: 12,000 input tokens × $3.00/1M + 800 output tokens × $15.00/1M = $0.036 + $0.012 = $0.048- On the OpenAI format, prompt tokens reported as cached (
prompt_tokens_details.cached_tokens, orinput_tokens_details.cached_tokenson/v1/responses) are split out of input tokens and billed at the cache-read rate. - Cache tokens are billed at the cache rates shown for the model, within two bounds: a cache read never costs more than the input rate, and a cache write never costs less than it. For a model that shows no cache-read rate, cache reads are billed at the input rate.
- On Claude models,
cache_controlon /v1/messages writes to a 5-minute cache: written tokens are billed at the cache-write rate, tokens read back at the cache-read rate. - Function calling has no separate price: tool definitions are input tokens and tool calls are output tokens.
- The calculator on the Models & Pricing page uses the same formula, but its result is still an estimate, because the real token count is only known after the request finishes.
- Prices can change. A request is always billed at the price in effect when it started.