Claude Code API cost calculator
Claude Code burns tokens faster than almost anything else because it re-reads context on every turn. Here is what that costs — and what it costs through a volume route.
Why Claude Code is expensive: every turn resends the accumulated conversation context. A long session can push 100K+ tokens per request even for a short answer. Output is usually small relative to input — for coding agents, budget roughly 10:1 input to output.
Want that number to be real? Create an account, add credit, and change your base URL.
Get API access →
Lowering the bill without switching provider
- Use Sonnet 5 for routine work, Opus 5 for hard reasoning. Sonnet is 2.5× cheaper on input.
- Keep sessions short. Long conversations are what inflate input tokens.
- Scope the context. Point the agent at a directory, not the whole repo.
- Then cut what is left by routing through a volume endpoint — the Claude family currently runs at 50% of Anthropic's list price. See the setup guide.
Figures are estimates based on list prices verified 2026-09-16. Actual spend depends on your cache hit rate, batch usage and long-context tiering.