Claude pricing is quoted as two numbers per million tokens — one for input (everything you send: system prompt, conversation history, tool definitions, documents) and one for output (everything the model generates). The asymmetry is consistent across the current lineup: Claude Opus 4.8 is $5 input / $25 output, Claude Sonnet 5 is $3 / $15 at standard pricing ($2 / $10 introductory through August 31, 2026), Claude Haiku 4.5 is $1 / $5, and Claude Fable 5 is $10 / $50. Output costs about 5× input everywhere. The intuition: input is read and processed as a batch, while output must be generated one token at a time, holding model capacity for the entire generation.
Output includes tokens you never see
The most common surprise on the output side is thinking. On models with extended or adaptive thinking, reasoning tokens are billed as output tokens and count toward max_tokens. The usage object breaks this out: usage.output_tokens_details.thinking_tokens reports the billed reasoning tokens, always a subset of output_tokens, which remains the authoritative billing total. Two traps follow. First, hiding thinking with thinking.display: "omitted" reduces latency, not cost — you're still billed for the full thinking tokens generated. Second, with summarized thinking you're billed for the full reasoning generated, not the shorter summary you see, so visible tokens will not match billed tokens.
Measure your ratio before optimizing
Every response's usage object carries input_tokens and output_tokens (in streaming, read the cumulative totals in message_delta events). Logging these two numbers per request type gives you the input-to-output ratio, and the ratio tells you where the money is:
| Workload shape | Typical ratio | Optimize first |
|---|---|---|
| RAG / document Q&A | Input-heavy (50:1 and up) | Prompt caching, trimming context |
| Chat assistants | Moderate (5–15:1) | Both sides; history sizing |
| Content generation, deep reasoning | Output-heavy (under 5:1) | Output volume and effort |
A workload sending 20,000 input tokens and receiving 500 output tokens on Opus 4.8 pays $0.10 for input and about $0.0125 for output — input dominates despite the 5× rate gap. Flip the shape (a report generator emitting 4,000 tokens from an 800-token brief) and output is roughly 96% of the bill.
Reducing output without losing quality
Ask for less, explicitly. Claude follows format instructions well — "answer in at most three bullet points, no preamble" is the cheapest optimization available. Anthropic's prompting guide has a dedicated section on controlling communication style and verbosity.
Use the effort parameter. output_config: {"effort": "medium"} (or "low") reduces all response tokens — text, tool calls, and thinking — and works with or without thinking enabled. On Sonnet 5, Anthropic notes medium is comparable to its predecessor at high effort, making it a genuine cost lever rather than a quality sacrifice for routine tasks.
Constrain the format. Structured outputs (output_config.format with a JSON schema) eliminate conversational wrapper text around machine-consumed answers. For quoting from documents, citations are more output-efficient than prompting for quotes — the cited_text returned doesn't count toward output tokens at all.
Cap the ceiling. max_tokens is a hard limit on thinking plus response text, useful as a runaway guard. Notably, it has no rate-limit downside: output-tokens-per-minute limits count only tokens actually generated, so setting a generous max_tokens costs nothing until used.
resp = client.messages.create(
model="claude-sonnet-5", max_tokens=1024,
output_config={"effort": "medium"},
system="Answer in at most 3 sentences. No preamble.",
messages=[{"role": "user", "content": question}])
print(resp.usage.input_tokens, resp.usage.output_tokens)
Where to go next
Input-side economics are covered in Cache Read vs Write Tokens, and history growth in Conversation History Sizing. For the basics of what a token is, see Tokens Explained.