Input and Output Tokens
What are input and output tokens?
Input tokens are the tokens sent to a language model in a request, and output tokens are the tokens it generates in response. Most AI services price output tokens several times higher.
Updated November 2026 · 2 min read
Input and output tokens are the two meters on an AI bill: input tokens count the text you send to a language model, and output tokens count the text it writes back. Input tokens include everything sent to the model: instructions, conversation history, documents, tool definitions and the user's question. Output tokens are what the model generates in reply. Providers count and price them separately, and output tokens usually cost several times as much as input tokens.
Why do output tokens cost more?
A model can process all input tokens in parallel in a single pass. Output has to be generated one token at a time, and each new token requires another pass through the model. Generating output therefore uses more computation and holds hardware longer per token, which providers reflect in their prices. The ratio varies by provider and model, but output prices of four to six times input prices are common, and some models charge eight times as much.
Where each type comes from
| Input tokens | Output tokens |
|---|---|
| System prompt and instructions | The visible answer |
| Conversation history | Reasoning tokens, for reasoning models |
| Retrieved documents and context | Tool calls the model writes |
| Tool definitions and tool results | Structured data, such as JSON |
| The user's message |
What this means for cost control
- Input-heavy applications, such as document analysis or retrieval-augmented assistants, often send tens of thousands of tokens and receive a few hundred. Their costs respond most to prompt caching, prompt compression and sending less context.
- Output-heavy applications, such as content generation or code writing, are more sensitive to output prices, answer length and reasoning effort.
- Repeated input is the easiest saving. System prompts and conversation history are resent with every request, and caching them can cut input costs sharply.
- Answer length is controllable. Asking for concise answers or setting a maximum output length can lower output costs without lowering quality.
An example
Consider a hypothetical support assistant with an average of 6,500 input tokens and 300 output tokens per message, on a model priced at $1 per million input and $4 per million output. Input costs $0.0065 and output $0.0012 per message, so input accounts for about 84% of the cost, despite output's higher price. A breakdown shows that 3,500 input tokens are the system prompt and product reference, identical on every request, and 2,000 are conversation history. The team caches the system prompt and summarizes history after five turns. Input cost per message falls by more than half, and output cost is unchanged.
Common pitfalls
- Assuming output dominates because its price is higher, when volume can make input the larger cost.
- Letting conversation history grow without limit.
- Forgetting reasoning tokens, which are billed as output even when hidden.
Prices for each type are covered in cost per token, and the limit on total tokens per request in context window.
Frequently asked questions
Why do output tokens cost more than input tokens?
A model processes all input tokens in parallel in one pass, but output tokens must be generated one at a time, each needing another pass through the model. Output uses more computation and holds hardware longer per token. Output prices of four to six times input prices are common, and some models charge eight times.
Can input tokens cost more than output tokens on an AI bill?
Yes. Although each output token is priced higher, input-heavy applications such as document analysis or retrieval assistants can send tens of thousands of input tokens and receive a few hundred back. The sheer volume of input tokens then makes input the larger share of cost, which teams miss if they look only at prices.
How do you reduce input and output token costs?
For input, cache repeated content such as system prompts, summarize or limit conversation history and send less context. For output, ask for concise answers, set a maximum output length and lower reasoning effort where it does not help. Remember that reasoning tokens are billed as output even when they are hidden.
Related terms
Reasoning Tokens
Hidden thinking a model does before answering, usually billed as output.
Prompt Caching
Reusing processed prompt content across requests to cut cost and latency.
Prompt Compression
Trimming prompts to fewer tokens while keeping what the model needs.
Cost per Token
The basic unit price of AI services, usually quoted per million tokens.