💳
Pricing & Authentication
How to authenticate and pay for Claude Code usage.
Authentication Options
Claude Code supports three authentication methods, each with different billing implications:
| Option | Billing | Best For |
|---|---|---|
| Anthropic API Key | Pay-as-you-go via Console | Usage-based billing, evaluation before committing |
| Claude Subscription | Fixed monthly (Pro $20, Max 5x $100, Max 20x $200) | Predictable costs, included Claude Code access |
| Third-party Cloud | Via AWS Bedrock, Azure, or Vertex AI | Enterprise, centralized billing, compliance requirements |
Monitoring Costs
Cost monitoring differs by authentication method. With an API key, use the /cost command to see token consumption. With a subscription, use /usage to see your consumption against plan limits.
bash
# API key users — check token costs
/cost
# Subscription users — check usage limits
/usageAvailable Models
| Model | Strengths | Typical Use |
|---|---|---|
| Claude Opus | Most capable, deep reasoning, 200K context | Planning, research, complex analysis |
| Claude Sonnet | Balanced speed/intelligence, 200K context | Code generation, implementation (primary workhorse) |
| Claude Haiku | Fastest, lightweight, lowest cost | Quick iterations, simple tasks, low-latency workflows |
⚠️Warning
When using an API key with agents, sub-agents, and orchestration patterns, a misconfiguration can trigger many parallel agents and consume tokens rapidly. Set spending limits in the Anthropic console to mitigate this risk.