esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

Why Are Input and Output Tokens Priced Differently?

How providers price the two sides of a model call, how the bill splits in two, and why hidden reasoning pushes the output side up, explained simply for your AI interview.

In short

Input tokens are what the model reads and output tokens are what it writes. Output costs more per token on published price lists. The model writes one token at a time, with a full model run for each, while it reads the whole input in one parallel pass.

11 min readBeginnerCommon · estimateFacts checked 26 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

Input tokens are the text the model reads, and output tokens are the text it writes. It reads the input in one parallel pass, but it writes the output one token at a time, and each token needs its own run of the model. That work is slower and heavier to run, and published price lists charge more per output token. Caching can cut the input bill, but it has no effect on output generation. So I watch output length first.

What are input and output tokens, in plain words?

A token is a small piece of text, often a word or part of one. Anthropic's glossary says a token can be a word, a subword, a character or even a byte. The model reads your prompt as tokens, and it writes its answer as tokens.

Think of a claims assessor at an insurer. Reading a 40-page claim file takes one sitting, and she can take in the whole thing at once. Writing the decision letter is slower: she writes a sentence, checks it against the file, then writes the next. A model works the same way. The prompt holds the claim file, and the answer is the summary the adjuster reads.

Key words

Token
A small piece of text, often a word or part of a word, that a model reads or writes.
Input tokens
Everything you send: the prompt, the documents and the chat history.
Output tokens
Everything the model writes back, one token at a time.
Reasoning tokens
Hidden thinking a model does before it answers. You don't see them, but they are billed.
Prompt caching
Keeping a long, repeated prompt ready so the provider can reuse it, which cuts the input cost. It does not change output.

Why does writing cost more work than reading?

The work happens in two phases. First the model reads the whole input in what NVIDIA calls the prefill phase, the reading step. Then it writes the answer in the decode phase, and that is where the extra work sits. Anthropic's glossary describes Claude as autoregressive: it predicts the next word from the text before it.

  • Input

    Read in one pass

    All the input tokens go through the model together, so many can be handled at the same time.

  • Output

    Written one at a time

    Each new token needs a full model run, and it has to look back at every token before it.

Reading once, writing one token at a time

You send

Claim file and policy

30,000 tokens, read in one pass

Model

reads it all in parallel

It writes back

Write one token

a full model run for each token

Stop at the end

1,500 tokens means 1,500 runs

Two prices

output costs more per token

  1. 1The whole claim file goes in at once.
  2. 2The model reads it in one parallel pass, then starts writing.
  3. 3Each token is written in its own run of the model.
  4. 4The finished reply is billed, with output priced higher per token.
The model reads the whole claim file in one parallel pass. Then it writes the reply one token at a time, and each token is a full model run. The two sides are billed apart.
  • “In the decode phase, the LLM generates output tokens autoregressively one at a time, until a stopping criteria is met.”

    NVIDIA technical blog, 2023

  • “Each sequential output token needs to know all the previous iterations' output states (keys and values).”

    NVIDIA technical blog, 2023

So a long answer is slow for a reason: every new token waits for the one before it.

How does the bill split into two prices?

Anthropic and Google both meter the two sides apart, with a price for each. On Anthropic's page, prices are in US dollars per million tokens. For Claude Sonnet 5.5 the output price is $10 against $2 for input, so output is five times the input price.

One request, two meters

Tokens in one reply

Input: 30,000 tokens

claim file and policy wording

Output: 1,500 tokens

the summary the adjuster reads

Price per token

Input at 1 unit

1 unit per input token

Output at 5 units

5 units per output token

Bill: 37,500 units

input 30,000 + output 7,500

  1. 1The 30,000 input tokens are counted at the input rate.
  2. 2The 1,500 output tokens are counted at five times that rate.
  3. 3The input part adds 30,000 units to the bill.
  4. 4The output part adds 7,500 units, a fifth of the bill.
Counts from one made-up claims reply. Units are a simple price scale: 1 per input token and 5 per output token, matching the five-times gap on Anthropic's list. So 1,500 output tokens weigh as much as 7,500 input tokens.

Here is the same split in a few lines of plain Python. The lines that matter are the price ratio and the two shares at the bottom. The adjuster types "Summarise claim 4471 for the adjuster in under 300 words." and the reply is the 1,500 tokens counted above.

Python
# Made-up claims assistant: input and output tokens are counted and priced apart.
INPUT_TOKENS = 30000    # claim file, policy wording and the question
OUTPUT_TOKENS = 1500    # the summary the adjuster reads
OUTPUT_PRICE_RATIO = 5  # output costs 5x input per token (Sonnet 5.5 list: $10 vs $2)

input_units = INPUT_TOKENS * 1
output_units = OUTPUT_TOKENS * OUTPUT_PRICE_RATIO
total_tokens = INPUT_TOKENS + OUTPUT_TOKENS
total_units = input_units + output_units

print(f"Tokens in all: {total_tokens:,}")
print(f"Output share of tokens: {OUTPUT_TOKENS / total_tokens:.1%}")
print(f"Output share of the bill: {output_units / total_units:.1%}")

Output

Tokens in all: 31,500
Output share of tokens: 4.8%
Output share of the bill: 20.0%

Tip

Asked how you'd lower the bill? Start with output. Measure output tokens per reply, cap the length, and keep hidden reasoning for the questions that need it.

Why do reasoning models push the output bill up?

A reasoning model thinks before it answers. That thinking uses reasoning tokens. OpenAI's guide says these take up space in the context window (the text the model can hold at once) and are billed as output tokens, even though you cannot see them through the API.

Made-up example: a contract review agent at a law firm writes a 2,000 token answer for the lawyer, but first thinks for 12,000 reasoning tokens. The bill counts 14,000 output tokens, seven times the answer the lawyer reads.

  1. 1

    Cap the output

    A limit on output tokens stops one reply from running on for pages. Less output means a smaller output bill.

  2. 2

    Use reasoning for hard cases

    Turn on hidden thinking for the questions that need it, and keep the easy ones fast.

  3. 3

    Cache the long input

    Caching cuts the cost of a long prompt that repeats. It does nothing to the output side.

How would you cut a support bot's output bill?

A support bot that writes long, polite replies can cost more than its input suggests. I would measure the output tokens per reply for a week first, then set a cap and ask for shorter answers. Then I would check that the shorter replies still solve the customer's problem before I roll them out.

What does the interviewer want to hear?

A strong answer covers

  • Input tokens are read in one parallel pass, output tokens are written one at a time.
  • Each output token needs its own model run, so output is slower to produce.
  • Anthropic and Google bill the two sides apart, and Claude Sonnet 5.5 on Anthropic's list charges five times more per output token than per input token.
  • Reasoning tokens are billed as output, so hidden thinking raises the bill.
  • Caching cuts input cost, but has no effect on output generation.
  • Measure both sides, then cap output and use reasoning only where it pays.

Common traps

  • Trap"Every token costs the same, so a long answer is just more of the same."

    BetterPublished price lists charge more per output token, and each output token needs its own model run.

  • Trap"Caching makes the whole bill cheaper, including the answer."

    BetterCaching helps the input side. It has no effect on how output tokens are generated.

  • Trap"Reasoning is free because you can't see the tokens."

    BetterHidden reasoning tokens are billed as output, so you pay for thinking you never read.

Can you spot the right explanation?

Spot the right explanation

A support bot reads a 6,000 token prompt and writes a 900 token reply. Which explanation is right?

Quick check

Your agent's bill is mostly output, and its replies are long. Which change cuts the output side most?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q029What do stop sequences and max tokens do?11 min
  2. Q040How do you estimate the token count of a text?10 min
  3. Q065Prefill vs decode phases?10 min
  4. Q088What is prompt caching, and how does it save money?13 min
  5. Q187How do you control agent cost?13 min

Learn it in depth

Last updated on 26 November 2026

Building an AI feature where the token bill keeps growing?

I design and build AI products and agents, including the UI and the system behind them. Book a short call and tell me what your bill and replies look like.