Teapot Router / Documentation
Claude Code pricing guide: subscription or pay-as-you-go
Understand the ways to pay for Claude Code, how per-token prices are structured, and how to estimate your real monthly cost.
Open the pricing ledgerHow Claude Code is billed
- Claude Code is the coding client on your machine; the cost comes from the model service behind it. The official routes are a Claude subscription (Pro/Max tiers, capped monthly) or the Anthropic API (metered per token).
- A gateway is a third route: pay-as-you-go with prepaid credit. One key speaks both the Anthropic and OpenAI protocols, and Claude Code connects by changing two environment variables.
- Subscriptions suit steady usage that wants a capped bill; pay-as-you-go suits spiky usage, several projects sharing credit, or teams that need exact per-project accounting.
| Route | How it charges | Best for |
|---|---|---|
| Claude subscription (Pro/Max) | Monthly fee with usage caps | Steady users who want a predictable bill |
| Anthropic API | Per token, pay as you go | Heavy users with international payment and billing set up |
| Gateway PAYG (e.g. Teapot Router) | Per token, prepaid credit that never expires | Spiky usage, shared or multi-project setups needing per-project accounting |
No route is universally better: estimate your monthly tokens first, then compare pricing structures.
Reading per-token prices
- Prices are quoted per million tokens, with input and output billed separately; output is usually a multiple of input.
- Within a family, the tier sets the price: Opus is the flagship and priciest, Sonnet is balanced, Haiku is the light, cheap tier. Prices can change with version updates.
- The pricing ledger on the site lists each model's input and output rates and what you actually pay, plus a machine-readable endpoint (/api/pricing) for scripts.
- When the prompt cache hits, reads bill at the cached-read rate, far below normal input — a big factor for Claude Code's long sessions that resend context.
Use the price table to orient yourself; the authoritative bill is the Usage record in the workspace.
Estimating your monthly cost
- Formula: cost per request ≈ input tokens ÷ 1M × input rate + output tokens ÷ 1M × output rate; monthly ≈ average × requests per day × 30.
- A better way: run your real tasks on the balanced tier for a week, export tokens and charges from Usage, and extrapolate.
- Tiering is the biggest cost lever: flagship for architecture and hard bugs, balanced for daily coding, lightweight for completions and bulk jobs.
- On this site, prepaid credit never expires — light months don't pressure you into burning balance.
Don't estimate per message: history inputs are billed again within a session (dropping sharply on cache hits); tokens are the only reliable unit.
Policies and setup
- Credit never expires. Refunds: file a ticket and get your remaining balance back (bonuses excluded); the platform covers refund fees.
- Alipay and international cards are accepted; top-ups start at $1 with no monthly fee.
- Claude Code setup is two environment variables: ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. Create a key and follow the Configure a client guide.
See Choosing a model for tier-by-task guidance, and Configure a client for the full setup.