Skip to main content

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 · inputUSD per 1M tokensPrompt tokens reported by the provider
Text · outputUSD per 1M tokensCompletion tokens reported by the provider
Cache read / writeUSD per 1M tokensCache tokens reported by the provider, if the model supports caching
EmbeddingUSD per 1M tokensEmbedding input tokens
ImageUSD per imageNumber of images produced
VideoUSD per secondVideo 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, or input_tokens_details.cached_tokens on /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_control on /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.

Start with any balance,
however small.

Create a free accountSign in AI API · pay as you go