Claude Code Pricing Guide: Token Costs, API Tiers, and Subscription Plans
Anthropic’s Claude Code CLI has quickly established itself as the leading terminal-native AI agent for software developers. However, understanding how Claude Code is billed across Claude Pro/Team subscriptions versus Anthropic Console API keys is crucial for managing monthly engineering expenses.
This guide details token pricing models, tier limits, hidden cost drivers, and practical strategies to reduce Claude Code API spend by up to 80%.
Executive Summary & Plan Comparison
┌────────────────────────────────────────────────────────────────────────┐
│ CLAUDE CODE ACCESS & BILLING │
└───────────────────────────────────┬────────────────────────────────────┘
│
┌─────────────────────────┴─────────────────────────┐
▼ ▼
┌──────────────────────────────┐ ┌──────────────────────────────┐
│ SUBSCRIPTION PLANS (PRO/TEAM)│ │ CONSOLE API PAY-AS-YOU-GO │
├──────────────────────────────┤ ├──────────────────────────────┤
│ • Flat Rate: $20 - $30/mo │ │ • Per-Token Billing Model │
│ • Fixed Hourly Usage Caps │ │ • Higher Rate Limit Tiers │
│ • Best for Individual Devs │ │ • Best for CI/CD & Enterprise│
└──────────────────────────────┘ └──────────────────────────────┘
| Tier / Plan | Monthly Cost | Authentication Method | Usage Limits | Best For |
|---|---|---|---|---|
| Claude Pro | $20 / month | OAuth Login (claude login) | ~45 messages / 5 hours | Individual developers |
| Claude Team | $30 / user / month | Team SSO OAuth | 5x Pro usage allowance | Small engineering teams |
| Console API (Tier 1-4) | Pay-as-you-go | API Key (ANTHROPIC_API_KEY) | Up to 10M Tokens/min | High-volume & CI/CD agents |
Model Token Rates (Anthropic Console API)
When operating Claude Code via an Anthropic Console API key, token consumption is charged based on the model selected:
| Model | Base Input Tokens | Prompt Cache Write | Prompt Cache Read | Output Tokens |
|---|---|---|---|---|
| Claude 3.7 Sonnet | $3.00 / 1M | $3.75 / 1M | $0.30 / 1M (-90%) | $15.00 / 1M |
| Claude 3.5 Haiku | $0.80 / 1M | $1.00 / 1M | $0.08 / 1M (-90%) | $4.00 / 1M |
3 Strategies to Cut Claude Code API Costs
- Keep
CLAUDE.mdUnder 200 Lines: Large system prompt files get sent on every single turn. Trimming prompt bloat saves thousands of input tokens per session. - Leverage Prompt Caching: Claude Code natively caches repository context headers. Repeated queries against the same workspace cost 90% less on cached input tokens ($0.30/1M vs $3.00/1M).
- Use
/compactRegularly: Compacting session memory removes old redundant stdout logs, keeping the active context window lean and cheap.


