AI Token Price

How AI Model Pricing Works: Tokens, Input and Output, Caching and Batch

Every AI API bills by the token, but the price on the pricing page is rarely what you pay. Here is how the bill is actually calculated.

Guide Published Updated 5 min read By AI Token Price

Tokens are the unit of billing

AI models read and write text in chunks called tokens. A token is usually a common word, part of a longer word, or a punctuation mark. In English, one token averages about four characters, or roughly three-quarters of a word, so 1,000 words come to around 1,300 tokens. Code, numbers and non-English text usually take more tokens per word.

Providers quote prices per million tokens (often written "per 1M"). For today’s prices per token, see what an AI token costs. A price of $2 per 1M input tokens means sending a 1,000-token prompt costs $0.002. That sounds tiny, and for one request it is. The numbers add up because real applications send thousands or millions of requests, and because the same text is often sent many times.

Each model family uses its own tokenizer, so the same paragraph can come to a different number of tokens on different models. Per-token prices are a good guide but not a perfect comparison. If two models are close in price, count the tokens for your own prompts on both.

Input and output are priced separately

Every request has two parts. Input is everything you send: instructions, the user's message, documents, earlier turns of the conversation, and tool definitions. Output is what the model writes back. The two are billed at different rates, and output almost always costs more.

The reason is how the models run. A model processes your whole prompt in parallel, but it writes its answer one token at a time, and each new token needs a full pass through the model. Among current models, output costs about five times as much as input at Anthropic and OpenAI, five to eight times at Google, and three to four times at xAI and DeepSeek.

ModelInput / output per 1M
Claude Opus 5.5$4.00 / $20.00
GPT-6.1 Sol$2.00 / $10.00
Gemini 3.8 Flash$0.75 / $3.75
Grok 4.7$2.00 / $6.00
DeepSeek V4.1 Flash$0.30 / $1.20

This matters when you compare models. A model with cheap input and expensive output suits work that reads a lot and writes a little, such as classification, extraction and search. For long answers, reports and code generation, the output price dominates.

Reasoning tokens count as output

Reasoning models think before they answer, and that thinking is billed as output tokens, even when the API does not show you the text. A question with a two-sentence answer can use thousands of reasoning tokens. Most APIs let you set a reasoning effort or a thinking budget; lower settings cost less and respond faster. If your bill is higher than your visible output suggests, reasoning tokens are the usual cause.

Blended price: one number for comparing models

Because input and output prices differ, comparing models on either one alone can mislead. A common shortcut is a blended price that assumes a typical mix. This site uses three input tokens for every output token, which fits chat and most business applications:

blended price = (3 × input price + output price) ÷ 4

For Claude Opus 5.5 at $4 / $20, that gives $8 per 1M tokens. Our token price index uses the same blend: the median frontier model now costs $4.00 per 1M tokens, down 3% since 13 Jun 2026. Agents and document-heavy apps read far more than they write, often 20 to 1 or more, so for those workloads the input and cached-input prices matter most.

Cached input: the discount most people miss

Many applications send the same text over and over: a long system prompt, a product catalogue, a document the user is asking about, or the growing history of an agent session. Providers can store the start of a prompt they have seen recently and bill those repeated tokens at a much lower cache-read rate.

ModelInputCached inputSaving on cached tokens
Claude Opus 5.5$4.00$0.2095%
Claude Sonnet 5.5$2.00$0.1095%
GPT-6.1 Sol$2.00$0.1095%
GPT-6 Luna$0.10$0.01090%
Gemini 3.8 Flash$0.75$0.07590%
Grok 4.7$2.00$0.5075%
DeepSeek V4.1 Flash$0.30$0.00698%

Per 1M tokens. Verified 13 Oct 2026; this table updates automatically.

Caching only applies to an identical prefix, the part of the prompt that comes before anything changes. Put stable content first (instructions, tool definitions, reference documents) and variable content last (the user's question, timestamps). A timestamp at the top of a system prompt breaks the cache on every request.

How caching is switched on differs by provider. Some cache repeated prefixes automatically; others need you to mark the part of the prompt to cache. Some also charge for writing to the cache or for how long it is kept, so check the provider's documentation before you rely on it.

Batch processing: half price if you can wait

Anthropic, OpenAI, Google and Mistral offer a batch API. You submit a file of requests and collect the results later, usually within a few hours, with a 24-hour completion window. In exchange, batch requests cost 50% less. Evaluations, bulk classification, embeddings, data cleaning and overnight report generation are all good candidates. Anything a user is waiting for is not.

xAI lists no batch discount for Grok 4.7, and DeepSeek has none. DeepSeek instead has off-peak pricing: requests sent during its off-peak hours cost half the normal rate, which gives a similar saving for work you can schedule.

Long prompts can cost more

Several providers charge more once a prompt passes a size threshold, and the higher rate usually applies to the whole request, not just the tokens above the line:

  • OpenAI GPT-6 and GPT-5.6: prompts over 272K tokens cost 2× the input price and 1.5× the output price.
  • Google Gemini 3.1 Pro: prompts over 200K tokens cost $4 / $18 instead of $2 / $12.
  • xAI Grok 4.7: prompts of 200K tokens or more cost $4 / $12 instead of $2 / $6.

A 1M-token context window is useful, but filling it is expensive. Retrieval, which sends only the relevant passages, is usually cheaper than sending whole documents.

Promotions and price changes

Launch prices do not always last. Gemini 3.8 Flash costs $0.75 / $3.75 until 31 December 2026, after which Google's published price doubles to $1.50 / $7.50. GPT-5.6 Sol's $4 / $20 is also a promotional price. Prices fall more often than they rise: OpenAI cut GPT-5.6 Luna by 80% in July, and Claude Opus 5.5 launched 20% below Opus 5. Our price history lists every change with its source.

A worked example

A support chatbot handles 50,000 conversations a month. Each conversation sends about 1,500 input tokens (instructions, help-centre snippets and the conversation so far) and gets back about 300 output tokens. That is 75M input and 15M output tokens a month:

ModelInput / output per 1MPer month
GPT-6 Luna$0.10 / $0.50$15.00
Claude Haiku 5.5$0.10 / $0.50$15.00
DeepSeek V4.1 Flash$0.30 / $1.20$40.50
Gemini 3.8 Flash$0.75 / $3.75$113
GPT-6.1 Sol$2.00 / $10.00$300
Claude Sonnet 5.5$2.00 / $10.00$300
Claude Opus 5.5$4.00 / $20.00$600

75M input and 15M output tokens a month. Prices verified 13 Oct 2026; this table updates automatically.

If 60% of that input is a repeated system prompt served from cache, the same traffic on GPT-6.1 Sol falls from $300 to $215 a month. Moving the nightly summaries, about a fifth of the traffic, to the batch API would cut it further, to $193.

Checklist before you pick a model

  1. Estimate your monthly input and output tokens, including resent history.
  2. Compare blended prices, then check input or output alone if your mix is lopsided.
  3. Check whether the model has a cache-read rate, and how much of your input repeats.
  4. Move anything that can wait to the batch API, or to off-peak hours on DeepSeek.
  5. Watch for long-prompt surcharges and promotions that end.
  6. Test the cheaper model on your own prompts. A model that needs two attempts costs double.

The token cost calculator applies caching and batch discounts for you, and the agent cost calculator models how context grows over a multi-step task. For more ways to save, see how to cut your AI bill in half.

Prices in this article come from each provider’s pricing page or, for open-weight models sold by other hosts, the cheapest host listed on OpenRouter. Live prices are always on the price table; tables marked “updates automatically” use current data.

More guides

All guides