Input tokens are the text you send into a model on a given request — your prompt, the system message, the conversation history, the files an agent pasted in, command output, tool definitions. Output tokens are the text the model generates back: its reasoning, its answer, the diff it writes. Providers count both separately, and — this is the part people miss — they bill them at different rates.The mechanism is simple once you see it. A language model is a next-token predictor. To produce each output token it must attend over every input token already in context, so the two sides do genuinely different amounts of work, and the price reflects that. Output is the expensive-per-unit side. With Claude Opus 4.8 at $5 / $25 per million tokens (MTok), each output token costs five times an input token; Sonnet 4.6 runs $3 / $15, Haiku 4.5 $1 / $5, and GPT-5.5 is $5 / $30 — a 6× gap. So a naive reading says "watch your output."For AI coding agents that reading is wrong, and it's wrong in an expensive way.
Why it matters in 2026
Here's the thing I keep having to explain. An agent's output per step is small — a few hundred tokens of plan, a patch, a shell command. Its input is enormous and, worse, it gets re-sent on every single step. The agent re-reads the file tree, the open buffers, the last twenty tool results, the whole growing transcript, every turn. A 50-step session can re-ingest the same context dozens of times.So even though output is 5–6× pricier per token, the input volume dwarfs it. In real coding sessions I routinely see input outnumber output 50:1 or worse. Multiply that by the per-token prices above and the bill is overwhelmingly an input bill. Optimising your prompts to be terse, or capping max_tokens, barely moves the needle. The needle lives on the input side.That's the whole reason prompt caching exists: cache reads are billed at roughly 10% of the normal input rate, so the static prefix you re-send every turn gets a 90% discount. It's also why the real lever is feeding the agent less input in the first place — sending a skeleton of a file instead of the whole thing, semantic search instead of dumping a directory, filtered tool output instead of 4,000 lines of build log. Cut the input and you cut the dominant cost, which is exactly what Tokenade does sitting between your agent and the model. (See the LLM API token pricing breakdown if you want the current per-model numbers.)
When the distinction doesn't matter
Single-shot, output-heavy generation. If you're asking a model to write a 3,000-word essay from a one-line prompt, output genuinely dominates — the input/output framing flips and capping or streaming output is the right move.
You're not running an agent. A one-turn chat with no re-read loop never re-pays its input, so the "input is re-ingested" argument evaporates.
You only care about the context window limit, not cost. Both input and output consume the same window budget regardless of price, so for fitting-it-all-in purposes a token is a token.
If you are running an agent, though, treat "reduce tokens" as "reduce input tokens" and you'll be aiming at the right 90% of the bill. Tokenade is source-available (MIT) and free up to ~10M tokens/month if you want to watch your own input/output split on the savings dashboard before deciding it matters.