Input vs Output Tokens

Input tokens are the tokens in your prompt—the text you send to the AI. Output tokens are the tokens in the model's response—the text it generates for you. The key difference: output tokens cost significantly more, typically 3–15× the price of input tokens.

This pricing asymmetry exists across every major LLM provider: OpenAI, Anthropic, Google, xAI, DeepSeek, and others. Understanding this difference is critical for cost optimization, especially at scale.

If you're building an AI application, the output length often determines your costs more than prompt length. A chatbot generating lengthy responses can quickly become expensive if you're not careful.

Calculate Your Costs Now

Input vs Output: The Pricing Difference

Here's how input and output token pricing compares across popular models as of November 2026:

Input vs output token pricing (per million tokens)
Model Input Price Output Price Output Multiplier
GPT-4o $2.50 $10.00 4×
GPT-4o mini $0.15 $0.60 4×
Claude 5.5 Sonnet $3.00 $15.00 5×
Claude 5.5 Haiku $0.80 $4.00 5×
Gemini 3.8 Flash $0.075 $0.30 4×
Gemini 4 Argon $1.25 $5.00 4×
Grok Beta $5.00 $15.00 3×
DeepSeek V4.1 $0.27 $1.10 4×

Notice the pattern: output tokens consistently cost 3–5× more than input tokens. This holds true even for budget models like GPT-4o mini and Gemini 3.8 Flash.

Real-World Cost Example

Consider a customer service chatbot using GPT-4o:

  • User prompt: 200 tokens (question + conversation history)
  • AI response: 800 tokens (detailed answer)
  • Input cost: 200 tokens × $2.50/M = $0.0005
  • Output cost: 800 tokens × $10.00/M = $0.008
  • Total: $0.0085 per conversation

In this scenario, output tokens represent 94% of the total cost despite being only 80% of the token count. At 100,000 conversations per month, that's $850 total, with $800 from output tokens alone.

Why Does Output Cost More?

The pricing difference reflects the computational asymmetry between reading and writing:

1. Generation Is More Expensive Than Processing

When an LLM processes input tokens, it runs one forward pass through the neural network. When generating output tokens, it must run the network once for every single token it produces, sampling from probability distributions and maintaining coherence across the entire response.

2. Autoregressive Generation

LLMs generate text one token at a time, where each new token depends on all previous tokens. This creates a quadratic computational cost: a 1,000-token response requires significantly more compute than processing a 1,000-token prompt.

3. Inference-Time Compute

Output generation locks GPU resources for the entire duration. A model generating 2,000 tokens at 50 tokens/second occupies expensive hardware for 40 seconds. Reading 2,000 input tokens might take under 1 second.

4. Economic Signal

Higher output pricing also incentivizes developers to request concise responses. Without this price signal, users might ask for unnecessarily verbose outputs, wasting provider resources and increasing latency for other users.

How to Optimize for Output Token Costs

1

Request Shorter Responses

Add constraints like "in 2-3 sentences" or "under 100 words" to your prompts. Use max_tokens parameter to enforce hard limits. For GPT-4o, reducing a response from 1,000 to 500 tokens saves $0.005 per request.

2

Use Structured Output Formats

JSON responses are typically shorter than prose. Instead of asking for an explanation in paragraphs, request structured data. A 500-word explanation might become 100 tokens of JSON.

3

Choose Models With Better Output Pricing

DeepSeek V4.1 charges $1.10/M for output vs Claude 5.5 Sonnet's $15.00/M—a 13.6× difference. If output length is your main cost driver, provider selection matters enormously.

4

Cache Repetitive Prompts

OpenAI and Anthropic offer prompt caching. If you're sending the same system instructions or context repeatedly, caching can reduce "effective input costs" by 90%, making the output portion of costs even more dominant. Optimize output length first.

5

Batch Process When Possible

OpenAI's Batch API offers 50% discounts on both input and output tokens. For non-urgent workloads generating large outputs (reports, summaries, translations), batching can halve your output token costs.

Frequently Asked Questions

Do I pay for output tokens I don't use?

No. You only pay for tokens the model actually generates. If you set max_tokens=1000 but the model stops after 200 tokens, you're billed for 200 output tokens.

Are reasoning tokens priced like output tokens?

No. OpenAI's o1 and o3 models use separate "reasoning tokens" for internal chain-of-thought. These are priced differently—often cheaper than output but more than input. Check the pricing table for model-specific rates.

Why doesn't every provider charge 5× for output?

Pricing reflects business strategy, not just compute costs. Some providers subsidize output to attract developers. Others use higher output multipliers (Anthropic's 5×) to maintain margins while offering competitive headline rates.

Can I reduce output costs with prompt engineering?

Absolutely. Asking for "bullet points" instead of "detailed paragraphs" can cut output length by 50–70%. Prompt engineering is the highest-leverage cost optimization after choosing the right model.

Do cached tokens count as input or output?

Cached tokens are a third category. Anthropic charges ~10% of input price for cache reads. OpenAI charges 50% of input price. Neither affects output pricing, which remains the same regardless of caching.