AI guides
AI token pricing explained: input, output, cached and batch rates
How AI APIs bill per token: what a token is, why output costs more than input, how cached input, cache writes and batch discounts work, where prompt-length tiers apply, and worked cost examples with catalog prices as of October 2026.
By Best AI Ever Editors Updated
Most AI APIs bill by the token: a price per million tokens you send (input) and per million tokens the model generates (output). Most providers charge less for repeated prompt content (cached input) and for work that can wait (batch), and some charge more for very long prompts or faster processing. This guide explains these price types, shows how to read them on the AI pricing page and works through examples with catalog prices as of October 2026.
In short:
- Cost = input tokens × input price + output tokens × output price, with prices per million tokens.
- Output usually costs three to five times as much as input, and reasoning tokens are billed as output.
- Cached input costs about 2% to 25% of the normal input rate across the catalog. Writing to the cache can cost extra.
- Batch processing halves token prices at Anthropic, OpenAI and Google. xAI gives 20% off on selected models.
- Some models bill the whole request at a higher rate once the prompt passes a size threshold.
Prices as of October 2026
Prices in the text come from the Best AI Ever catalog as of October 2026. The tables and the calculator on this page read the catalog live, so they may later show newer figures than the text.
What a token is
Language models read text as tokens, which can be words, parts of words, characters or bytes [1]. Google's rule of thumb for Gemini is about four characters per token, or 60 to 80 English words per 100 tokens [2].
The split depends on the model's tokenizer, so the same text gives different counts on different models. Anthropic says Claude 4.7 and later models produce about 30% more tokens for the same text than earlier Claude models [1]. A lower per-token rate can therefore still cost more. For exact numbers, run your own prompts through each provider's token counter.
Images and audio become tokens too. Gemini counts 258 tokens for an image up to 384 pixels on each side, 258 tokens per 768×768-pixel tile of a larger image and 32 tokens per second of audio [2].
The basic formula
Prices are quoted per million tokens, often written "/ MTok". As DeepSeek's pricing page puts it, the cost is the number of tokens times the price [3]. For one request:
cost = input tokens × input price / 1,000,000
+ output tokens × output price / 1,000,000
As of October 2026, Claude Sonnet 5.5 costs $2 per million input tokens and $10 per million output tokens [4]. A request with 3,000 input tokens and 500 output tokens costs $0.006 for input and $0.005 for output, $0.011 in total.
Input tokens and output tokens
Input is everything you send: the system prompt, the user's message, earlier turns of the conversation (sent again with every turn), retrieved documents, images and tool definitions. Some input is added for you: Anthropic, for example, adds a tool-use system prompt to every request that defines tools [4].
Output is everything the model generates, and it almost always costs more than input. In the catalog as of October 2026, the output rate ranges from equal to the input rate (for example Ministral 3 14B) to more than eight times it (for example Gemini 3.5 Flash-Lite). For most text models it is three to five times the input rate.
Reasoning tokens count as output
Reasoning models generate internal "thinking" tokens before the visible answer. OpenAI bills them as output tokens; they are not visible through the API but still take up context space [5]. Gemini's output prices include thinking tokens [6]. Anthropic bills the full thinking as output even when the response shows only a summary of it [7].
These tokens can dominate the bill. Take a request to Claude Opus 5.5 ($4 input, $20 output per million tokens as of October 2026) with 2,000 input tokens, 800 visible output tokens and 6,000 thinking tokens. Input costs $0.008 and the 6,800 output tokens $0.136, $0.144 in total. Without the thinking it would cost $0.024, so reasoning is about 83% of the bill. The reasoning models guide covers when that is worth paying for.
Cached input: cheaper repeated prompts
Many requests start with the same content, such as a long system prompt, tool definitions or an ongoing conversation. Prompt caching lets the provider reuse its earlier work on that repeated opening part (the prefix) and bill it at a lower cached-input rate. The rules differ:
- Anthropic charges 1.25 times the base input price to write a 5-minute cache and 2 times for a 1-hour cache. Cache hits cost 0.1 times the base input price, 0.05 times on Claude Opus 5.5 and Sonnet 5.5, and 0.025 times on Claude Fable 5.1. These multipliers stack with the batch discount [4].
- OpenAI caches by default. On GPT-5.6 and later, the minimum cacheable prompt is 1,024 tokens, writes cost 1.25 times the uncached input rate for the default 30-minute cache and 2.5 times for a 12-hour cache (Responses API only), and reads 0.1 times (0.05 times on GPT-6.1 Sol) [8].
- Google caches implicitly on Gemini 2.5 and newer, from 4,096 tokens on Gemini 3.8 Flash [9]. It also lists a storage price for cached content, $0.50 per million tokens per hour for Gemini 3.8 Flash through 2026-12-31 [6].
Caching pays off quickly. With hits at 10% of the input price, Anthropic calculates that a 5-minute cache write pays for itself after one cache read and a 1-hour write after two [4]. A hit needs the prefix to match exactly, so put stable content (instructions, tool definitions, reference documents) first and changing details such as timestamps last [8].
In the table below, a dash means the catalog lists no separate price of that type.
| Model | Input tokens | Cached input tokens | Cache writes | Output tokens |
|---|---|---|---|---|
| Claude Sonnet 5.5 Anthropic | $2.00 per 1M tokensverified 2026-10-25 | $0.10 per 1M tokensverified 2026-10-25 | $2.50 per 1M tokensverified 2026-10-25 | $10.00 per 1M tokensverified 2026-10-25 |
| GPT-6.1 Sol OpenAI | $2.00 per 1M tokens tieredverified 2026-10-25 | $0.10 per 1M tokens tieredverified 2026-10-25 | $2.50 per 1M tokens tieredverified 2026-10-25 | $10.00 per 1M tokens tieredverified 2026-10-25 |
| Gemini 3.8 Flash Google | $0.75 per 1M tokensverified 2026-10-25 | $0.075 per 1M tokensverified 2026-10-25 | — | $3.75 per 1M tokensverified 2026-10-25 |
| Grok 4.7 xAI | $2.00 per 1M tokens tieredverified 2026-10-25 | $0.50 per 1M tokens tieredverified 2026-10-25 | — | $6.00 per 1M tokens tieredverified 2026-10-25 |
| DeepSeek-V4-Pro DeepSeek | $1.32 per 1M tokensverified 2026-10-25 | $0.044 per 1M tokensverified 2026-10-25 | — | $3.96 per 1M tokensverified 2026-10-25 |
Batch pricing: a discount for waiting
A batch API takes a large set of requests and returns the results later. OpenAI's Batch API costs 50% less than its synchronous APIs, and each batch completes within 24 hours [10]. Anthropic also takes 50% off input and output tokens [4], and Google lists a 50% reduction for the Gemini Batch API on its paid tier [6]. xAI gives 20% off on selected models such as Grok 4.3 and nothing on the rest [11]. Batch suits work no one is waiting for: evaluations, classifying large datasets or nightly reports.
| Model | Input tokens | Output tokens | Batch input tokens | Batch output tokens |
|---|---|---|---|---|
| Claude Sonnet 5.5 Anthropic | $2.00 per 1M tokensverified 2026-10-25 | $10.00 per 1M tokensverified 2026-10-25 | $1.00 per 1M tokensverified 2026-10-25 | $5.00 per 1M tokensverified 2026-10-25 |
| GPT-6.1 Sol OpenAI | $2.00 per 1M tokens tieredverified 2026-10-25 | $10.00 per 1M tokens tieredverified 2026-10-25 | $1.00 per 1M tokens tieredverified 2026-10-25 | $5.00 per 1M tokens tieredverified 2026-10-25 |
| Gemini 3.8 Flash Google | $0.75 per 1M tokensverified 2026-10-25 | $3.75 per 1M tokensverified 2026-10-25 | $0.375 per 1M tokensverified 2026-10-25 | $1.875 per 1M tokensverified 2026-10-25 |
| Grok 4.3 xAI | $1.25 per 1M tokens tieredverified 2026-10-25 | $2.50 per 1M tokens tieredverified 2026-10-25 | $1.00 per 1M tokens tieredverified 2026-10-25 | $2.00 per 1M tokens tieredverified 2026-10-25 |
| Mistral Medium 3.5 Mistral AI | $1.50 per 1M tokensverified 2026-10-25 | $7.50 per 1M tokensverified 2026-10-25 | $0.75 per 1M tokensverified 2026-10-25 | $3.75 per 1M tokensverified 2026-10-25 |
Tiers: when the rate depends on the request
One model can have several prices for the same kind of token:
- Prompt-length tiers. Above a prompt-size threshold, some models bill the whole request at a higher rate, not just the tokens past the threshold [12] [11]. As of October 2026, GPT-6.1 Sol goes from $2/$10 to $4/$15 per million input/output tokens above 272K input tokens [12], and Grok 4.7 doubles to $4/$12 once the prompt reaches 200K tokens [11]. Claude Haiku 5.5 goes from $0.10/$0.50 to $0.50/$2.50 above 100,000 tokens, with cache reads and writes counting toward that length [4]. Gemini 3.1 Pro costs $4/$18 instead of $2/$12 above 200K tokens [6]. Claude Opus 5.5, Sonnet 5.5 and Fable 5.1, by contrast, keep standard rates across the full 1M-token context window [4]. See the context windows guide for more on long prompts.
- Speed and priority tiers. OpenAI lists Flex, Fast (called Priority until July 2026) and, for two models, Ultrafast rates [13]; on GPT-6.1 Sol, Flex costs half the standard rate [12]. Anthropic's fast mode for Claude Opus 5.5 costs $8/$40, twice the standard rate [4], and xAI bills priority processing at twice its standard rates [11].
- Time, region and date. DeepSeek halves its prices outside peak hours (01:00–04:00 and 06:00–10:00 UTC on weekdays, except Chinese public holidays) [3]. US-only processing costs 1.1 times the standard rate on Claude 4.6 and later models [4] and on xAI's US endpoint [11]. Some prices change on a set date: Gemini 3.8 Flash input costs $0.75 per million tokens through 2026-12-31 and $1.50 from 2027-01-01 [6].
How to read the AI pricing page
The AI pricing page gives each price type its own section, from input and output tokens to cache writes, batch rates and tool fees.
- Base tier only. Rows show the base price. A "tiered" badge links to the model page, which lists the rates for larger requests.
- Units and currencies. Token prices are per million tokens; other prices state their unit, such as per 1,000 requests. Rows are sorted within each currency, never converted.
- Dated and sourced. Each price shows its verification date and links to the provider's official page. Prices come from provider documentation, not from tests of our own (see the methodology).
- Text models only in text-token tables. Image-only and speech-only models appear only in the image and audio sections. Tool fees are listed with what they cover, not ranked.
- Filters. Narrow the page by dimension (price type), provider, currency or capability.
Worked examples (prices as of October 2026)
A support assistant with a long fixed prompt
A support assistant handles 100,000 requests a month, each with 4,000 input and 400 output tokens. 3,000 of the input tokens (system prompt and policy text) are identical every time. That makes 400 million input and 40 million output tokens a month.
On Claude Sonnet 5.5 without caching, input costs $800 and output $400: $1,200 a month. With the fixed 75% of the input cached, the 300M cached tokens cost $30 at $0.10 per million, the 100M uncached tokens $200 and output $400: $630. Even 2,000 cache rewrites a month (6M tokens at $2.50 instead of $0.10 per million) add only about $15.
The model choice matters even more. Claude Haiku 5.5 costs $0.10 input, $0.01 cached and $0.50 output per million tokens for prompts up to 100,000 tokens, so the same cached workload costs $3 + $10 + $20 = $33 a month, if the smaller model does the job well enough.
The calculator below starts with these monthly totals. The full cost calculator also takes the cached share (75% here), the number of requests and batch processing. It does not include cache-write charges.
One long document, four price structures
A request analyzes a 300,000-token contract and returns 5,000 tokens. As of October 2026, the four models below share a $2 base input rate, but three have a prompt-length tier. For comparison, the first column shows a 190,000-token document (costs rounded to the cent):
| Model | 190,000 in + 5,000 out | 300,000 in + 5,000 out |
|---|---|---|
| Claude Sonnet 5.5 | $0.43 | $0.65 |
| GPT-6.1 Sol | $0.43 | $1.28 |
| Grok 4.7 | $0.41 | $1.26 |
| Gemini 3.1 Pro (preview) | $0.44 | $1.29 |
Below every threshold the four cost about the same. Above it, the tiered models cost about twice as much as Claude Sonnet 5.5, because the higher rate applies to every token in the request. If your requests often cross a threshold, compare models at your real request size or split documents to stay under it. Given the number of requests, the calculator picks the tier from the average request size.
A nightly batch job
A nightly classification job processes 10 million input and 1 million output tokens. On Claude Sonnet 5.5 it costs $30 at standard rates and $15 through the Batch API. On Grok 4.3, with xAI's 20% batch discount, it costs $15 at standard rates and $12 in batch.
Putting it together
- Measure tokens with each provider's own counter, and watch output, including reasoning tokens that never show up in the answer.
- Put long, fixed prompt content first so it can be cached, and send work that can wait through a batch API.
- Check for prompt-length tiers before sending very long prompts.
Estimate a full month in the cost calculator and compare models side by side on the comparison page. The guide to reducing AI API costs turns these points into concrete savings steps.
Sources
- Glossary - Claude Platform Docs
- Understand and count tokens | Gemini API
- Models & Pricing | DeepSeek API Docs
- Pricing - Claude Platform Docs
- Reasoning models | OpenAI API
- Gemini Developer API pricing
- Steering thinking - Claude Platform Docs
- Prompt caching | OpenAI API
- Context caching | Gemini API
- Batch API | OpenAI API
- API Pricing
- GPT-6.1 Sol Model | OpenAI API
- Pricing | OpenAI API