SwitchEarly access
← All guides
Claude Code

Claude subscription vs API billing in Claude Code

Claude Code can use a Claude subscription or API billing. With a subscription (Pro, Max, Team or Enterprise), usage is included up to your plan's limits. With an API key, you pay per token with no plan limit. If ANTHROPIC_API_KEY is set and approved, Claude Code uses it instead of your subscription.

A guide from Switch, an independent Claude Desktop profile manager. Switch is in early access ahead of its public release.

Two ways to pay for Claude Code

Subscription login. You sign in with your claude.ai account. Claude Code is included in all paid plans and shares their limits: a session limit that resets every five hours and a weekly limit. As of October 2026, Pro is $20 a month and Max is $100 or $200 a month (claude.com/pricing).

API billing. You use a Claude Console account, an API key, or a cloud provider. Usage is pay-as-you-go per token, billed to that account, with no hard stop (Models, usage, and limits in Claude Code). API prices differ by model and are charged per million input and output tokens; see Anthropic’s pricing page for current rates.

Which one suits you

A subscription gives a predictable monthly cost. The trade-off is that you stop, or switch to paid credits, when you reach a limit. API billing is pay as you go, so cost depends on how much you use, though API accounts have rate limits and admins can set spend limits for a workspace.

For a sense of scale, Anthropic's costs page says that across enterprise deployments the average is around $13 per developer per active day and $150 to $250 per developer per month, with 90% of users below $30 per active day. Your own numbers depend on model choice, codebase size and habits.

A subscription suits steady daily use where a predictable bill matters. Anthropic also suggests a Console account with API credits for intensive coding sprints.

How to tell which one is active

Run /status in Claude Code. Anthropic's authentication docs say it confirms which method is active, and when a login and an API key are both configured it marks the one not in use.

Other signs: /usage shows plan usage bars on a subscription, while on API billing its Session block shows an estimated dollar cost. You can also run /cost to see running spend for API users.

ANTHROPIC_API_KEY overrides your subscription

This is the most common cause of surprise charges. In Claude Code's authentication precedence, an ANTHROPIC_API_KEY environment variable ranks above your subscription login. In interactive mode Claude Code asks once whether to use the key and remembers your choice; in non-interactive mode (-p) it always uses the key. Anthropic's help center warns that this results in API charges instead of using your plan's included usage.

To go back to your subscription:

unset ANTHROPIC_API_KEY

Then remove the line that sets it from your shell profile, start Claude Code again, and check /status. While the variable is set, you can also change your earlier choice with the "Use custom API key" toggle in /config. Claude Desktop doesn't read this variable; it signs in with OAuth.

Staying on your plan only

When you reach a limit on a subscription, Claude Code may offer to continue with API credits. Anthropic says you can decline and wait for the reset. To stop the option appearing, log out, log back in with only your Pro or Max credentials, and don't add Console credentials (Use Claude Code with your Pro or Max plan). Auto-reload of API credits is a Console setting, so check it there if you've used API billing before.

If you have a work account billed one way and a personal plan billed another, give each its own CLAUDE_CONFIG_DIR so the logins don't mix. See multiple Claude Code accounts on one Mac, or Switch for Claude Code if you use Claude Code inside Claude Desktop.