guides

Input vs. output token pricing: what changes the bill

See how the input/output mix changes cost, why averages hide risk, and which workload controls matter.

ai-cost pricing planning
A balance with a small blue input stack and a larger coral output stack

Input tokens are the instructions and context sent to a model. Output tokens are the generated response. Providers commonly publish a separate price for each, so two applications with the same total token count can have different bills when their input/output mix differs.

Why one average token price can mislead

Suppose a hypothetical model costs $2 per million input tokens and $10 per million output tokens. At 10 million total tokens, the bill changes with the response share:

Output shareInput tokensOutput tokensTotal
10%9M × $2 = $181M × $10 = $10$28
30%7M × $2 = $143M × $10 = $30$44
50%5M × $2 = $105M × $10 = $50$60

The model and total volume never changed. Only the token mix changed. That is why CostUse keeps input, output, and a common 70/30 comparison in separate columns.

What increases input volume

  • Long system instructions included with every request
  • Conversation history sent back to the model
  • Retrieved documents, search results, and tool responses
  • Large schemas, examples, or formatting rules
  • Repeated context that does not qualify for a cached-input rate

Reducing input is not simply “write a shorter prompt.” Inspect what the application resends automatically. A short user message can still produce a large request when history and retrieved context travel with it.

What increases output volume

  • High maximum-output limits
  • Requests for long explanations or multiple alternatives
  • Verbose structured fields and repeated text
  • Tool loops that add another generated turn
  • Retries that regenerate an entire response

A useful control is to budget completion length by workflow. A classification label, a support reply, and a long report should not share one output ceiling. The correct limit is the smallest one that still meets the product requirement.

How cache and batch modes fit in

Some providers publish a lower cached-input rate or separate batch price. Those savings are conditional, not automatic. Confirm which tokens qualify, how long a cache remains valid, whether a minimum volume applies, and whether the slower processing window is acceptable. Keep the standard rate as the conservative baseline until the workload proves eligibility.

Check the provider’s current documentation: OpenAI pricing, Claude pricing, and Gemini pricing.

A better way to compare models

  1. Measure input and output on a sample of real tasks.
  2. Use the same sample and quality requirement for every model.
  3. Calculate the expected mix and an output-heavy stress case.
  4. Add retries, cache eligibility, and non-token service costs.
  5. Open the full model rate table and apply the same assumptions to the shortlist.

Bottom line

Total tokens alone do not explain an LLM bill. Track which side of the request created them. Once input and output are measured separately, cost controls become concrete: shorten repeated context, cap responses by task, reduce unnecessary retries, and apply discounted modes only when their conditions match production.