Artificial intelligenceProgrammingFor beginners

What kinds of tokens are there, what they are for and why they don’t cost the same

24 Oct 2026 · 19 min read

One million tokens does not have one price. Input, output, cache and hidden thinking are each billed differently. With ordinary text models, output is typically about five times more expensive than input, while reading from cache costs only a fraction. Images and audio have further rates. In this article we explain what the individual kinds of tokens mean and how to calculate a bill from them. Rates are valid as of 24 October 2026.

The article in 30 seconds

Four things worth knowing

  • 1Output costs a multiple of input. For most text models roughly five times, for GPT-5 eight times.
  • 2Cache reads cost 2.5–10% of the input price. Writes cost 1.25× to 2.5× ordinary input.
  • 3Reasoning is billed at the output rate even though you don’t see it in the answer. A short answer can therefore hide a long, paid process.
  • 4Embedding, image and audio have their own rates. Moreover, the same sentence does not have the same number of tokens with every vendor.

Mini-glossary

Eight terms that will let you read a price list and the usage field in an API response.

Token
A short piece of text, image or audio that the model computes with. A word, a syllable or a fragment of a word can each be one token.
Input token
Anything you send into the model: the brief, history, tools, documents. Also called a prompt token.
Output token
What the model generates. The visible answer, tool calls and hidden thinking.
Cache read
Reuse of an already processed beginning of the prompt. Billed at a fraction of the input price.
Cache write
The first storing of that beginning. It costs more than ordinary input and replaces it; it is not added on top.
Reasoning token
A token of the internal process of a model that “thinks”. In the price list it has the output rate.
Embedding token
Input to a model that returns a vector of numbers. You don’t pay for generated text.
Tokenizer
The rule that cuts text into tokens. It differs for each vendor, which is why the number of tokens in the same sentence differs too.

What a token is

A language model does not work directly with words. The tokenizer splits text into short pieces; image and audio are converted into their own kinds of tokens. In English, one text token corresponds to roughly four characters, i.e. often a short word or part of a longer word. A Czech sentence usually breaks into more tokens than an English sentence of the same length.

A token is simultaneously a unit of computation and of price, but it does not represent a fixed amount of text. A million tokens of English corresponds to roughly three quarters of a million words; in Czech, less text fits into the same number of tokens. Only the tokenizer of the specific model shows the exact count. The rule “one word = one token” therefore usually underestimates the bill.

The same rate does not mean the same bill. Claude 4.7 and newer use a tokenizer that produces roughly 30% more tokens from the same text. Even at the same rate per million, the same paragraph can therefore cost more. Compare the price of the whole task, not just the line in the price list.

Input tokens

An input token is everything the model receives in a given request. This includes the system instruction, your question, the conversation history so far, tool definitions, an inserted document and the tool result from the previous step. Vendors call it input or prompt token.

It serves so that the model knows what to build on. With an agent, the input bill therefore grows with every step: the tenth step sends the first nine again unless the cache covers them. With RAG, the retrieved paragraphs are input too. The model “reads” them every time you put them into the prompt.

Input tends to be cheaper than output because the model processes it all at once in the so-called prefill. With an agent, however, input can be more expensive overall: the long history is sent repeatedly while the answer tends to be short. Put the stable part — instructions, tools and permanent background material — at the beginning of the prompt and the changing question after it. Such a prefix can be stored in the cache.

Output tokens

Output is produced gradually, token by token. This process is called decoding and each new token depends on the previous ones. That is why output tends to be more expensive than input. For Claude Sonnet 5.5, Opus 5.5, Haiku 5.5, Gemini 4 Argon and GPT-6 Luna it costs five times as much; for GPT-5 eight times — USD 1.25 per million input tokens and USD 10 per million output tokens.

Output includes the visible answer, the text of a tool call and formatting tokens you won’t see in the answer. When the model writes get_weather and the arguments, those tokens are output. Once the tool returns JSON with the weather and you send it back, it becomes input of the next step.

Output is therefore usually the most expensive part of ordinary text traffic. For rewriting a whole contract or a detailed procedure you pay the higher rate for every generated token. An instruction that reasonably shortens the answer thus usually saves more than the same shortening of the brief.

Cache: reads and writes

The cache reuses an already computed beginning of the prompt. It stores the model’s internal state, the so-called KV cache, not a finished answer. For the next request to hit, it must have the same prefix from the start. Changing the system instruction, the order of tools or the model breaks the match from the point of change.

One unit is the price of ordinary input. A cache read is one twentieth, output including thinking five times. The bar for reads is on the same scale, which is why it is only a short dash.

Reads and writes each have their own rate:

Cheaper than input

Cache read

For most OpenAI models it is 10% of input. GPT-5 thus charges USD 0.125 versus USD 1.25. Claude Opus 5.5, Sonnet 5.5 and GPT-6.1 Sol have 5%. Claude Fable 5.1 has 2.5%.

More expensive than input

Cache write

Claude: 1.25× input with a 5-minute lifetime and 2× with one hour. OpenAI from GPT-5.6: 1.25× at 30 minutes and 2.5× at 12 hours. This is the full price of those tokens, not a surcharge on top.

With Claude, a five-minute write pays for itself after a single further read. An hour-long write pays off after two reads. With OpenAI, with a thirty-minute write and reads at a tenth of input, one write and nine reads cost 2.15 times ordinary input. Without cache the same ten passes would cost ten times.

For GPT-5 and older models, OpenAI’s price list has no separate write rate. There is only discounted reading and the cache runs implicitly. From GPT-5.6 the write is billed separately and the prefix must be at least 1,024 tokens. Cache can only be read from the beginning of the prompt. The end, which changes with each query, stays at the full input rate.

With Gemini you need to distinguish implicit and explicit cache. The price of explicit storage also differs by model.

No storage fee

Implicit cache

Gemini 2.5 and newer, including Argon. The discount only comes when the request hits. Savings are not guaranteed. Argon has no other cache.

Read plus storage

Explicit cache

Gemini 2.5 and 3. For 2.5 Pro, storage costs USD 4.50 per million tokens per hour. One read saves USD 1.125, so four reads per hour exactly pay for the storage.

Price depends on model

Storage with Flash models

Gemini 2.5 Flash: USD 1 per million tokens per hour. Gemini 3.8 Flash: USD 0.50 until the end of 2026.

Tokens the model thinks with

A reasoning token — a thinking token at Anthropic and a thought token at Google — captures the model’s internal process before the answer. It has no special surcharge: it is billed at the same rate as the rest of the output. It raises the bill through the number of tokens, not a higher price per token.

At both OpenAI and Anthropic, output_tokens represents the entire paid output. The fields reasoning_tokens and thinking_tokens only break it down. If a response reports 1,186 output tokens, of which 1,024 reasoning, you pay for 1,186 tokens — you don’t add the two numbers. The internal process is billed even when the API returns only a summary of it or hides it entirely. The article Reasoning models explains more.

Gemini says it directly in its price list: “output price (including thinking tokens)”. The output price includes both visible text and thinking. If the summary field already contains thought tokens, don’t add them a second time.

A short answer can be expensive. Five hundred visible tokens and a thousand thinking tokens are, with Sonnet 5.5, fifteen hundred tokens at USD 10 per million. Thinking in this step costs twice as much as the sentence the user reads. The cap max_output_tokens at OpenAI counts reasoning, visible text and hidden formatting together.

If you keep the thinking block in the history, it becomes input in the next request. Anthropic then bills it as ordinary input, or as a cheaper cache read. Hidden work from a previous round can thus make the following rounds more expensive too.

Embedding

Embedding is a different type of operation. The model converts text into a vector of numbers by which similar content can be searched. You pay only for input; no generated text is produced, which is why the price list has no output rate.

Embedding is orders of magnitude cheaper than having a chat model read the same text.

0,02A million tokens of documentation in text-embedding-3-small. Output is not paid; the model just returns a vector.USD / million
1,25One read of the same million by GPT-5, before any answer. That is 62.5× more.USD / million
0,20–12Gemini Embedding 2: text 0.20, image 0.45, audio 6.50 and video USD 12 per million tokens.of input

In practice you embed a document once and send only the retrieved parts to the chat model. Those are billed as ordinary input with every query unless the cache covers them. Gemini File Search additionally charges embedding at USD 0.15 per million tokens; the retrieved text then enters the model at its usual input rate.

Image, audio and video

Image, audio and video are also billed in tokens, but each modality has its own rate.

The table can be scrolled sideways on mobile.

What you pay for price
Text and thinking, Gemini 3 Pro Image USD 12 / million
Image output of the same model USD 120 / million
One 1K or 2K image USD 0.134
One 4K image USD 0.24
One input image USD 0.0011
Audio input, gpt-realtime-2.1 USD 32 / million
Text input of the same model USD 4 / million
Audio on input, Gemini 2.5 Flash USD 1.00 / million
Text, image and video, Gemini 2.5 Flash USD 0.30 / million
With Gemini 3 Pro Image, a 1K or 2K image has 1,120 tokens, 4K has 2,000 tokens and an input image 560 tokens. With Gemini, a PDF is billed as an image and the modality in the response is DOCUMENT.

In live conversation, token rates can be combined with a fee for time. GPT-Live 1 costs USD 0.05 per minute and the backend model’s tokens are billed separately.

Tools, too, such as web search, have their own price per call. OpenAI charges USD 10 per thousand searches plus the tokens of the retrieved text. Gemini 3 and newer cost USD 14 per thousand queries once the monthly free volume is used up.

Same token, different rate

The kind of token determines the base column of the price list. Processing mode, region and context length can then change the rate. The token remains input or output; only its unit price changes.

½Batch and often Flex too. The same work, slower or less predictable response.
2×Fast for GPT-5 and Claude Opus 5.5. At OpenAI it used to be called Priority.
5×Haiku 5.5 once the prompt exceeds 100k tokens. This applies to the cache as well.
+10 %Regional processing and data residency for new OpenAI and Claude models.

In dollars the multiples show directly. Fast mode raises GPT-5 rates to USD 2.50 for input and USD 20 for output; for Claude Opus 5.5 to USD 8 and 40. Ultrafast for GPT-6 Astra costs USD 60 and 300 versus the standard 10 and 50. With Claude, Batch can be combined with cache. The regional surcharge of 10% also applies to cache and Fast mode.

Context length can trigger another change. Once a set threshold is exceeded, the whole request moves into a higher price band. Claude from version 4.6, with the exception of Haiku 5.5, holds one rate up to a million tokens.

The table can be scrolled sideways on mobile.

Situation Input output
GPT-6 Luna up to 272k 0,10 0,50
GPT-6 Luna above 272k 0,20 0,75
Haiku 5.5 up to 100k 0,10 0,50
Haiku 5.5 above 100k 0,50 2,50
USD per million tokens. For Haiku above 100k tokens in the prompt, cache reads (to 0.05) and the five-minute write (to 0.625) also become five times more expensive. Cache tokens count towards the length too. Shorter requests before that keep their original price.

Training tokens when fine-tuning a model are a separate item. You won’t see them in the receipt for an ordinary query; they have their own rate and sometimes a price per hour of compute. OpenAI is moreover winding down self-service fine-tuning. For ordinary API calls, therefore, watch mainly input, cache and output.

Price list as of 24 October 2026

All amounts in the table are in USD per million tokens, in standard mode and with a short context. It is an indicative selection from three price lists. For cache writes we give the shortest offered lifetime; a dash means the price list does not state a separate write rate.

The table can be scrolled sideways on mobile.

Model Input Cache read Cache write output
text-embedding-3-small 0,02 — — —
Gemini Embedding 2, text 0,20 — — —
GPT-6 Luna 0,10 0,01 0.125 / 30 min 0,50
Claude Haiku 5.5 up to 100k 0,10 0,01 0.125 / 5 min 0,50
GPT-5 1,25 0,125 — 10
Claude Sonnet 5.5 2 0,10 2.50 / 5 min 10
Gemini 4 Argon until 30 Nov 2026 2 0,10 — 10
Claude Opus 5.5 4 0,20 5 / 5 min 20
Claude Fable 5.1 10 0,25 12.50 / 5 min 50
Standard rate in USD per 1 million tokens as of 24 October 2026. From 1 December 2026, Gemini 4 Argon will double input, cache reads and output. Haiku above 100k tokens in the prompt and GPT-6 Luna above 272k have a higher band described in the text.

The table shows two independent choices. The model determines the basic price level, the kind of token the ratio between input, cache and output. Embedding costs hundredths of a dollar, while reading by a chat model costs dollars. Haiku 5.5 and GPT-6 Luna have input at one twentieth of the price of Sonnet or the discounted Argon; Fable’s output, conversely, is a hundred times Haiku’s output. For both, output remains five times more expensive than input.

Ten agent steps

An agent uses Claude Sonnet 5.5 and a stable prefix of 20,000 tokens — instructions and tool definitions. In each of ten steps it adds 1,000 new input tokens. The model produces 1,500 output tokens: 1,000 for thinking and 500 for the visible answer. In the first step the prefix is written to the five-minute cache; in the next nine it is only read.

The table can be scrolled sideways on mobile.

Item Tokens USD / million USD
Cache write, once 20 000 2,50 0,050
Cache read, nine times 180 000 0,10 0,018
New input, ten times 1,000 10 000 2,00 0,020
Output including thinking 15 000 10,00 0,150
Total with cache 0,238
Same work without cache 0,570
Without cache the input is 21,000 tokens in every step at USD 2, i.e. USD 0.420, plus the same output of USD 0.150.

The cache lowers the total bill by 58%. The input part drops from USD 0.420 to 0.088, i.e. by roughly 79%. Output stays the same: of the total USD 0.150, USD 0.100 goes to hidden thinking and USD 0.050 to the visible answer.

USD 0.238Ten steps with cache
USD 0.570The same work without cache

total price =
reads × read rate
+ writes × write rate
+ new input × input rate
+ output × output rate

The example uses Claude, which has no separate hourly storage fee. With the explicit cache of Gemini 2.5 Pro, the price for storage time would be added to the tokens. Claude and newer OpenAI models instead charge a more expensive write and then cheap reads until the prefix expires. At Anthropic, every read renews the cache lifetime, so an active agent keeps extending its five-minute window.

How to read the receipt

Similarly named fields are counted differently by each vendor. At OpenAI the cache is part of the total input and is subtracted from it. Anthropic returns it in separate fields that are, conversely, added together. Mixing up these rules easily doubles the bill or leaves the cache out of it.

OpenAI

cached_tokens are part of input_tokens. The difference is multiplied by the full input rate. cached_tokens are multiplied by the cache rate. From GPT-5.6, part of the input may also be at the cache write rate. That rate replaces ordinary input.

reasoning_tokens are part of output_tokens. They are multiplied once, by the output rate.

Anthropic

input_tokens are only the tokens after the last cache breakpoint. Total input is the sum of cache_read_input_tokens + cache_creation_input_tokens + input_tokens. Each summand has its own rate.

output_tokens already contains thinking. thinking_tokens is a breakdown, not a second bill.

A sample OpenAI response in which the cache is part of the input and reasoning part of the output:

{
  "input_tokens": 21000,
  "input_tokens_details": { "cached_tokens": 20000 },
  "output_tokens": 1500,
  "output_tokens_details": { "reasoning_tokens": 1000 }
}

One step is paid in three lines:

20 000Cache. At OpenAI subtract it from input_tokens. At Anthropic you find it in its own field and add it.
1 000New input, full rate. At OpenAI it is the remainder after subtracting the cache.
1 500The whole output. A thousand of it is reasoning. It is not added a second time.

At Anthropic, the same 20,000 tokens from cache would not be in input_tokens. They would sit in cache_read_input_tokens and be added to input_tokens.

Stable prefix firstLet instructions, tools and permanent background material form the beginning. Let the question that changes come after it.
Cap the outputReasoning and visible text share the output rate. Without a limit, thinking can make up most of the bill.
Separate embedding from chatEmbed the corpus with a cheap model. Send only the retrieved pieces to the expensive model.
Batch where time isn’t pressingOvernight batches, transcripts and bulk evaluation run at half price, often with cache on top.

Frequently asked questions

Is reasoning more expensive per token than an ordinary answer?

A reasoning token is not more expensive than a visible token. Both are billed at the output rate; the price is raised by the number of thinking tokens. A thousand hidden tokens therefore cost the same as a thousand tokens of text the user reads. Gemini states it in its price list as “output price including thinking tokens”.

Why is output more expensive than input?

The model processes input in a batch. It assembles output token by token and every further step waits for the previous one. For that difference vendors charge a multiple, most often five, for GPT-5 eight.

Do I have to turn the cache on?

On supported OpenAI models it runs implicitly. Anthropic waits for cache_control, whether on the whole request or on a specific block. Gemini 2.5 and newer have an implicit cache of their own. An explicit cache, where the discount is agreed in advance, exists for Gemini 2.5 and 3. Gemini 4 Argon does not have it.

Is the chat history counted again?

Yes, as input of every further step. The cache can turn it into a cheap read if the beginning of the prompt has not changed and has not yet expired. Changing a tool or a sentence in the middle of the instruction cancels the match from that point.

Are tool results a special kind of token?

The tool result you send into the model is input. The text with which the model calls the tool is output. Server-side tools additionally have their own price per call, for example web search. That is not in the token field.

Can I pick a cheaper model by the rate per million tokens?

Only as a first sieve. What decides is the tokenizer, the share of output, whether the model thinks, whether the prefix fits in the cache and whether the prompt stays below the long-context threshold. Claude produces roughly 30% more tokens from the same text than its previous tokenizer. Haiku above 100k tokens in the prompt becomes five times more expensive, cache included.

Tokens meet in an agent

In the AI Agent Developer course you combine input, cache, tools and the agent loop into one working system. On its bill you will then see the same items as in the example above: stable prefix, new input and output.

See the course

Sources

Zdeněk Vais

About the author

Zdeněk Vais

Founder · Senior Principal Software Engineer, Oracle

Zdeněk has been programming since high school. Since then he has gone from programmer through team leader to architect, building large financial systems, scientific applications and IoT solutions for aircraft along the way. He currently works as a senior principal software engineer at Oracle, where he builds the cloud for media services.

Meet our team →

← Back to the blog

Leave a Reply

Your email address will not be published. Required fields are marked *