💳

Pricing & Authentication

How to authenticate and pay for Claude Code usage.

Authentication Options

Claude Code supports three authentication methods, each with different billing implications:

OptionBillingBest For
Anthropic API KeyPay-as-you-go via ConsoleUsage-based billing, evaluation before committing
Claude SubscriptionFixed monthly (Pro $20, Max 5x $100, Max 20x $200)Predictable costs, included Claude Code access
Third-party CloudVia AWS Bedrock, Azure, or Vertex AIEnterprise, 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
/usage

Available Models

ModelStrengthsTypical Use
Claude OpusMost capable, deep reasoning, 200K contextPlanning, research, complex analysis
Claude SonnetBalanced speed/intelligence, 200K contextCode generation, implementation (primary workhorse)
Claude HaikuFastest, lightweight, lowest costQuick 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.

Before you continue

We use analytics cookies to understand how the documentation is used and improve the experience. Privacy Policy.