How AI pricing works: input, output, thinking and cached tokens
Output tokens cost five times more than input on current Claude models. Here is a real bill worked step by step, plus how thinking, caching and batch change it.
In part 1 we saw what a token is. Now the part every founder asks me about: what does one AI request actually cost? Let's work through a real bill, step by step, with today's prices.
How AI pricing works
AI APIs charge per token, quoted per million tokens (often written MTok). There are separate prices for:
- Input tokens: everything you send. System prompt, chat history, your message, files and tool definitions.
- Output tokens: everything the model writes back, including any thinking it does before answering.
Output always costs more. On Anthropic's price list (as of 24 November 2026), the three current Claude models cost:
- Claude Opus 5.5: $4 per million input tokens, $20 per million output tokens.
- Claude Sonnet 5.5: $2 input, $10 output.
- Claude Haiku 5.5: $0.10 input, $0.50 output, for prompts up to 100,000 tokens.
In all three, writing a token costs five times more than reading one. That one fact explains most surprise bills.
A real example: reviewing one blog post
This site has an AI helper that reviews a draft and lists grammar, clarity and SEO issues. Let's price one review of my part 1 article. I measured the token counts with OpenAI's tiktoken tokenizer, so treat them as close estimates for Claude, whose tokenizer is different.
- The house voice instructions (the system prompt): 248 tokens.
- The article as plain text (the helper strips the HTML first): 1,737 tokens for 1,308 words.
- The task instructions: about 150 tokens.
So the input is about 2,100 tokens. Say the review comes back at 1,500 tokens of output.
- Opus 5.5: 2,100 × $4 ÷ 1,000,000 = $0.0084 input. 1,500 × $20 ÷ 1,000,000 = $0.0300 output. Total: about $0.038.
- Sonnet 5.5: $0.0042 input + $0.0150 output. Total: about $0.019.
- Haiku 5.5: $0.00021 input + $0.00075 output. Total: about $0.001.
Two lessons sit in those numbers. First, the output was smaller than the input, yet it was nearly 80% of the bill on every model. Second, the cheapest model costs about 40 times less than the most capable one. Picking the right model for each task matters more than shaving words off a prompt.
Thinking tokens are output tokens
Many models can think before they answer. You don't see that thinking as the answer, but you pay for it. OpenAI says reasoning tokens count toward output usage and are billed as output tokens, and Claude bills thinking the same way.
Back to our example. If Opus thinks for 2,000 tokens before writing the 1,500-token review, the output becomes 3,500 tokens. The bill goes from $0.038 to about $0.078: double for the same visible answer. That's why I set a lower effort level for simple jobs like alt text, and a higher one only where reasoning actually helps.
Prompt caching: pay less for the same input
If you send the same long beginning again and again, you can cache it. Anthropic prices it as a multiple of the normal input price (pricing page):
- Writing to the cache: 1.25× the input price for a cache that lasts 5 minutes, or 2× for 1 hour.
- Reading from the cache: 0.1× the input price on most models. On Sonnet 5.5 and Opus 5.5 a cache hit costs 0.05×.
Say an editor runs 10 different AI actions on the same article within 5 minutes: review, title ideas, summary and so on. The voice and the article (about 1,985 tokens) are the same in every call. On Sonnet 5.5:
- Without caching: 10 × 1,985 tokens × $2 per million = $0.040.
- With caching: one cache write at $2.50 per million ($0.0050), then 9 reads at $0.10 per million ($0.0018) = $0.0068.
That's about 83% less for the shared part of the input. Caching only applies to a repeated beginning of the prompt, and there's a minimum length a model will cache, so check the prompt caching docs for your model before you design around it.
Two more price switches
- Batch processing: if the answer can wait, Anthropic's Batch API gives a 50 percent discount on both input and output tokens. Good for nightly jobs like tagging hundreds of products.
- Very long prompts: Claude Haiku 5.5 charges more for a prompt over 100,000 tokens ($0.50 input and $2.50 output per million). Anthropic says Claude 4.6 and later models, except Haiku 5.5, include the full 1M-token context window at standard pricing.
How to keep your AI bill predictable
- Cap the output. Set
max_tokensper feature. A title suggestion never needs 4,000 tokens. - Match the model to the job. Use the small model for classification, alt text and summaries.
- Control thinking. Use low effort where the task is simple.
- Cache the repeated part. Long instructions and shared documents go first in the prompt so they can be cached.
- Batch what can wait. Half price for work that doesn't need an instant answer.
- Log real usage. Every API response reports the true input and output tokens. Store them per feature. Part 7 of this series shows how I do it in Laravel.
Quick summary
- You pay per million tokens, with separate input and output prices.
- On current Claude models, output costs 5× input. Long answers drive the bill.
- Thinking tokens are billed as output, even though you don't see them as the answer.
- Caching a repeated prompt can cut that part of the input by over 80%. Batch jobs cost half.
- Prices change. Check the official pricing page on the day you plan your budget.
Next in the series: how much an AI can remember in one go, and why long chats get slower and more expensive.
References
- Pricing, Claude Platform Docs, Anthropic, accessed 24 November 2026.
- Prompt caching, Claude Platform Docs, Anthropic, accessed 24 November 2026.
- Understanding and counting tokens, OpenAI Help Center, accessed 24 November 2026.
- tiktoken, OpenAI on GitHub, version 0.14.0.
Questions people ask
How is AI API usage priced?
Per million tokens, with one price for input tokens (what you send) and a higher price for output tokens (what the model writes).
Why do output tokens cost more than input tokens?
On current Claude models output costs five times the input price, so long answers drive most of the bill.
Are thinking tokens billed?
Yes. Thinking or reasoning tokens are billed as output tokens, even though they are not shown as the answer.
How much does prompt caching save?
A cache read costs 0.1x the input price on most Claude models (0.05x on Sonnet 5.5 and Opus 5.5). In the worked example, caching cut the shared input cost by about 83%.