How does AI API pricing work? Tokens, input, output and caching explained
Updated 2026-11-23 with live prices and published benchmarks.
Short answer
You pay per token (about 4 characters of English), per million tokens, with one price for input (what you send) and a higher price for output (what the model writes). Repeated parts of your prompt can be cached and billed much cheaper. Example: one call to Claude Fable 5.2 with 3,000 input and 800 output tokens costs $0.056, or $0.044 if half the prompt is cached.
The three prices on every model
| Price | Claude Fable 5.2 | What it covers |
|---|---|---|
| Input | $8.00 / 1M | Your prompt, system instructions, documents and conversation history |
| Output | $40.00 / 1M | The model's answer, including hidden reasoning tokens on reasoning models |
| Cached input | $0.200 / 1M | Prompt parts identical to a recent call, like a fixed system prompt |
Worked example
Cost of one call = 3,000 × $8.00 / 1,000,000 + 800 × $40.00 / 1,000,000 = $0.056. At 10,000 calls a day that is about $16,800 a month, or $13,290 with half of each prompt cached.
Things that surprise people
- Reasoning models also bill their hidden "thinking" as output tokens, which can multiply the cost of a call.
- Every turn of a conversation re-sends the earlier turns as input, so long chats get more expensive per message.
- The same model can cost different amounts from different API providers.
Questions
What is a token in AI pricing?
A token is a chunk of text the model reads or writes, about 4 characters or three-quarters of a word in English. Prices are quoted per million tokens.
Why is output more expensive than input?
Writing each output token needs a full pass of the model, while input tokens are processed together in parallel, so providers usually charge 3–5 times more for output.
What are cached tokens?
When the start of your prompt matches a recent call, providers can reuse their work and bill those input tokens at a much lower cached rate.
Prices from OpenRouter; scores from Artificial Analysis, LMArena and SWE-bench Verified where published. How we get our numbers · All guides