Workspace

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 ledger
01 / Claude Code pricing guide: subscription or pay-as-you-go

How Claude Code is billed

  1. 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).
  2. 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.
  3. 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.
RouteHow it chargesBest for
Claude subscription (Pro/Max)Monthly fee with usage capsSteady users who want a predictable bill
Anthropic APIPer token, pay as you goHeavy users with international payment and billing set up
Gateway PAYG (e.g. Teapot Router)Per token, prepaid credit that never expiresSpiky usage, shared or multi-project setups needing per-project accounting

No route is universally better: estimate your monthly tokens first, then compare pricing structures.

02 / Claude Code pricing guide: subscription or pay-as-you-go

Reading per-token prices

  1. Prices are quoted per million tokens, with input and output billed separately; output is usually a multiple of input.
  2. 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.
  3. 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.
  4. 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.

03 / Claude Code pricing guide: subscription or pay-as-you-go

Estimating your monthly cost

  1. Formula: cost per request ≈ input tokens ÷ 1M × input rate + output tokens ÷ 1M × output rate; monthly ≈ average × requests per day × 30.
  2. A better way: run your real tasks on the balanced tier for a week, export tokens and charges from Usage, and extrapolate.
  3. Tiering is the biggest cost lever: flagship for architecture and hard bugs, balanced for daily coding, lightweight for completions and bulk jobs.
  4. 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.

04 / Claude Code pricing guide: subscription or pay-as-you-go

Policies and setup

  1. Credit never expires. Refunds: file a ticket and get your remaining balance back (bonuses excluded); the platform covers refund fees.
  2. Alipay and international cards are accepted; top-ups start at $1 with no monthly fee.
  3. 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.