
Cost per Token: How AI Is Billed
AI providers bill per million tokens, with separate input and output rates. October 2026 prices and how to estimate the cost of a feature before you build it.
How is the use of an AI model billed?
The usual model is pay-per-use: you pay for what you consume, not for capacity reserved up front. It is the same logic as cloud computing, where, according to Wikipedia, spending shifts to a model in which “costs scale with usage”. The trade-off looks similar too: without oversight, spending can exceed the budget.
In an AI API, the unit is the token. The three pricing pages we checked use the same scheme:
- Input and output priced separately. Input is what you send (instructions, history, documents). Output is what the model writes. Each has its own rate per million tokens (MTok).
- Batch processing. For work that does not need an immediate answer, Anthropic, OpenAI and Google offer a 50 percent discount.
- Caching. Reusing a repeated prompt prefix is billed separately: reading it costs far less than normal input.
How much do the models cost today?
The table shows three models from each provider, in US dollars per million tokens, as they appeared on the official pages on October 30, 2026. They are an entry-level, a mid-range and a high-end model, but they are not equivalent in capability: compare them as an order of magnitude, not as a ranking.
| Model | Input | Output | Cache read | Batch input | Batch output |
|---|---|---|---|---|---|
| Claude Haiku 5.5 (prompts up to 100,000 tokens) | 0.10 | 0.50 | 0.01 | 0.05 | 0.25 |
| Claude Sonnet 5.5 | 2 | 10 | 0.10 | 1 | 5 |
| Claude Fable 5.1 | 10 | 50 | 0.25 | 5 | 25 |
| OpenAI gpt-6-luna | 0.10 | 0.50 | 0.01 | 0.05 | 0.25 |
| OpenAI gpt-6.1-sol | 2 | 10 | 0.10 | 1 | 5 |
| OpenAI gpt-6-astra (up to 272,000 tokens) | 10 | 50 | 1 | 5 | 25 |
| Google Gemini 3.8 Flash | 0.75 | 3.75 | 0.075 | 0.375 | 1.875 |
Three readings:
- The gap between the cheapest and the most expensive model from the same provider is 100 times. Choosing the model is the biggest cost decision.
- In every row, output costs five times input.
- Prices change. Google announces that Gemini 3.8 Flash input goes from 0.75 to 1.50 on January 1, 2027. That is why the official pages take precedence over this table.
Why doesn’t the real cost match the table?
Because the price per token is only one factor. These are the others the official pages mention:
- Long context. Anthropic prices Haiku 5.5 differently when the prompt exceeds 100,000 tokens (0.50 input and 2.50 output instead of 0.10 and 0.50). OpenAI and Google also raise the rate above certain prompt sizes (272,000 and 200,000 tokens for the models that list it). A conversation that accumulates history can cross that threshold without anyone noticing.
- Reasoning tokens. Google states that Gemini’s output rate includes “thinking” tokens: what the model thinks before answering is not shown on screen, but it is billed as output.
- Different tokenizer, different count. Anthropic documents that its models from Claude 4.7 onward produce roughly 30 percent more tokens than earlier ones for the same text. The same price per token does not mean the same cost per task, and counts measured with one model do not carry over to another.
- Cache multipliers. For Claude, writing to the 5-minute cache costs 1.25 times base input and the 1-hour cache costs twice that. Reading costs 0.1 times input for most models, but 0.05 for Opus 5.5 and Sonnet 5.5, and 0.025 for Fable 5.1. Confirm the multiplier for the model you use. Google also charges hourly cache storage for most of its models.
To understand why history weighs on every turn, look at the context window.
Why does this matter to a designer?
Because every interface decision has a cost that multiplies with usage:
- Response length. Since output is the most expensive part, a 1,000-token answer costs ten times more than a 100-token one. A format that asks for a lot of text by default raises cost without the user asking for it.
- History. The full conversation is usually sent again on every turn, so a long session makes each new answer more expensive.
- Fixed context. A system prompt or a document included every time is paid on every request, unless it uses caching.
- Frequency. An autocomplete that fires on every keystroke costs far more than one that waits for a pause or a click.
- Model choice. Not every task needs the most expensive model. A simple classification can run on a cheap one.
Obsessing over cost is not always worth it. If the feature has low volume or delivers a lot of value per use, saving a few cents per request does not make up for a confusing interface. And if trimming context hurts quality, the user pays for the saving in rework. Measure cost and quality together.
How do I estimate the cost of a feature?
- Calculate the average input tokens (instructions, history, documents).
- Calculate the average output tokens.
- Multiply each by its rate per million.
- Multiply by the expected requests per month.
- Check against real cases: averages mislead when a few heavy users concentrate the consumption.
To count tokens for real, do not guess. Anthropic offers a token-counting endpoint, free and subject to per-minute limits, that returns an estimate before you send the message. It recommends counting with the exact model you plan to use.
Example
Illustrative example: a notes assistant receives 100,000 requests a month with Claude Sonnet 5.5 (2 input and 10 output per million, per the table). Each request carries a fixed 3,000-token system prompt, an average history of 2,000 tokens and a 200-token message, so 5,200 input tokens, and the reply is 400 tokens.
- Without caching: 520 million input tokens cost 1,040 dollars and 40 million output tokens cost 400. Total: 1,440 dollars a month.
- With the system prompt cached: 300 million tokens are read from the cache at 0.10 per million (30 dollars), the remaining 220 million input tokens cost 440 and output still costs 400. Total: 870 dollars a month, 40 percent less.
The calculation ignores the cost of rewriting the cache each time it expires and assumes the fixed part meets the provider’s requirements. Even so, it shows something useful: the team changed nothing for the user, and the decision came from a spreadsheet, not from intuition.
Common mistakes
- Estimating cost from the price per token without multiplying by real volume.
- Forgetting that the history is sent again on every turn.
- Ignoring output tokens, which are the most expensive.
- Comparing models only by price per token, without considering that each one counts tokens differently.
- Copying figures from an old article (including this one): rates change, so check the official page.
Sources
- Anthropic, “Pricing” (prices per model, caching, batch and tokenizer; consulted October 30, 2026): https://platform.claude.com/docs/en/about-claude/pricing
- Claude, “Pricing” (plans summary and API prices; consulted October 30, 2026): https://claude.com/pricing
- Anthropic, “Token counting” (token counts as an estimate, free to use, new tokenizer): https://platform.claude.com/docs/en/build-with-claude/token-counting
- OpenAI, “Pricing” (standard and batch rates; consulted October 30, 2026): https://developers.openai.com/api/docs/pricing
- Google, “Gemini API pricing” (rates, caching and batch; last updated October 28, 2026): https://ai.google.dev/gemini-api/docs/pricing
- Wikipedia, “Cloud computing” (pay-per-use and cost overruns): https://en.wikipedia.org/wiki/Cloud_computing