Claude Code for Free: Installation, Subscription, and API

You can install Claude Code without paying separately for the client, but the Claude.ai Free plan does not include Claude Code. Working requests need a paid Claude plan, Console/API billing, or a supported third-party provider. A free installation and free model usage are not the same thing.

Need API access with your own key and pay-as-you-go billing? Claude Code can connect to BetterToken. It is an independent service, not a Claude subscription: the account, key, balance, and request history are managed in BetterToken. Check current models and prices on the pricing page.

What Is Free in Claude Code, and What Is Paid

There is no separate charge to download and install the client. Installation alone, however, does not provide model access: Claude Code must authenticate through a paid Claude plan, Claude Console, or a supported enterprise platform.

On the current Claude pricing page, Claude Code is listed as a feature of all paid plans. It is not listed in the Free plan description. Plan features and limits can change, so old screenshots and fixed numbers quickly become outdated.

The statement that “Claude Code is free” usually refers only to the client. Model requests consume either the allowance of a paid plan or billable API tokens.

Claude Subscription and API Are Different Billing Models

When you sign in through Claude.ai, Claude Code usage is included in your paid plan and shares the plan's overall usage limits with other Claude surfaces. When you authenticate through Claude Console, token-based API billing applies. The actual cost depends on the model, context size, and amount of work.

  • Paid Claude plan: subscription billing with included usage; usage is counted in the plan's shared allowance; check /usage and Settings → Usage. It fits interactive work when you already have a plan.
  • Claude Console / API: token-based billing; usage is counted in the API organization and workspace; check /usage for the session and Claude Console for billing. It fits separate API billing, budgeting, and organizational access.

How to Avoid Mixing Up Subscription and API Authentication

Claude Code selects credentials according to a priority order. The ANTHROPIC_API_KEY environment variable takes precedence over OAuth authentication through /login. In interactive mode, Claude Code asks once for permission to use a detected key; in non-interactive -p mode, the key is used automatically when it is set.

You can check whether the variable is set without printing its value:

if [ "${ANTHROPIC_API_KEY+x}" = x ]; then
  printf '%s\n' 'Variable is set'
else
  printf '%s\n' 'Variable is not set'
fi

Then run /status inside Claude Code. The Login method line shows the active authentication method, and an additional API key line appears when an API key is in use.

If you intended to use your subscription but an environment key is active, remove it from the current session with:

unset ANTHROPIC_API_KEY

Run /status again afterward. Do not manually delete credential files: use the official /logout and /login commands to change the saved account.

How to Read Usage and Limits in /usage

The Session section at the top of /usage shows statistics for the current session: input, output, cache read, and cache write tokens. Its dollar figure is calculated locally from token counts and may differ from the actual bill.

For API users, this section is useful for estimating session usage, but the authoritative billing record is the Usage page in Claude Console. After /clear, the counters for the new session start again.

For Pro, Max, Team, and Enterprise subscribers, Claude Code usage is included in the plan. The Session dollar estimate is therefore not the amount charged to the subscription. On the same screen, subscribers can see plan usage bars, activity statistics, and breakdowns for skills, subagents, plugins, and MCP servers.

The d and w keys switch the breakdown between the last 24 hours and seven days. This information comes from local history on the current computer and does not include activity from other devices or claude.ai.

Where to Check the Current Terms

Four official pages cover this topic:

Do not treat prices, limit sizes, or feature sets as permanent values in your notes. Open the current pricing page before paying or changing your authentication method.

How to Choose a Claude Code Access Method

The right choice depends on where usage should be accounted for:

  1. You already have a paid Claude plan and work interactively. Sign in with /login, check Login method in /status, and monitor the plan bars in /usage.
  2. Your organization needs separate API billing and spend limits. Use Claude Console access and check the actual bill in Console, not the local Session estimate.
  3. Claude Code runs in CI or a script without a browser. API access is one option, but not the only one: the official documentation also supports a long-lived subscription OAuth token through claude setup-token. The active authentication method determines how usage is paid for.
  4. Your paid plan limit is exhausted. You can wait for it to reset, switch plans, or enable usage credits if they are available for your account. Additional usage is billed at standard API rates.

After changing the access method, repeat two checks: /status answers “which account is active?”, while /usage answers “which limit or usage record is visible now?”

The main comparison of payment routes is in How to Pay for Claude Code in Russia: Subscription or API. This page keeps the narrower distinction between a free client installation and paid model access.

Frequently Asked Questions

Can I Use Claude Code on the Free Plan?

On the current pricing page, Claude Code is listed for paid plans but not for Free. You can install the client without a separate purchase, but model requests require a supported paid access method.

Why Does /usage Show Dollars If I Have a Subscription?

It is a local estimate of the API cost of tokens used in the current session. For a subscriber, it is not a bill. Check the plan usage bars on the same screen.

Can an API Key Switch Claude Code from Subscription to API Billing?

Yes. If ANTHROPIC_API_KEY is set and its use has been approved, it takes precedence over subscription OAuth. Check the active method in /status.

Where Can I See the Exact API Charges?

In Claude Console. The Session section in /usage is intended as a local estimate and may not match the actual bill.

Related articles