Yes. You can use local Claude Code without a Claude Pro or Max subscription by authenticating with a Claude Console API key. Anthropic also documents organization paths through Claude for Teams or Enterprise and supported cloud providers such as Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry.
That does not make Claude Code free. A Console API key sends usage to the Console organization that owns the key and bills it under current API rates. It also does not replace subscription credentials everywhere: Claude Code on the Web always uses subscription credentials, and some remote or Claude.ai-connected features do not support API-key authentication.
The decision begins with where the code will run. If you need local terminal or IDE work, an API key can be a valid official path. If you need Anthropic's Web execution or subscription-connected features, verify the current eligible plan and account controls.
Last verified: 2026-08-27. Authentication order, supported providers, plan eligibility, model access, and rates can change. Check Anthropic's live documentation and your account before relying on a route.
Claude Code access options at a glance
Anthropic supports several credentials because individuals, teams, and enterprises can have different bill owners and infrastructure requirements.
These paths all provide access to Claude Code under different authentication and deployment contracts. They do not imply that any model from any provider can be placed behind Claude Code. Anthropic's official provider and gateway documentation is centered on supported Claude-model routes.
For plan prices and usage structures, use the separate Claude Code pricing guide. This page stays focused on whether a subscription is required and how authentication changes.
How a Claude Console API key works
Anthropic's authentication documentation says that when ANTHROPIC_API_KEY is present, Claude Code skips the normal browser login prompt and asks the user to approve use of the key in interactive mode. Non-interactive mode uses the key when it is present.
A safe local setup has five parts:
- Use a Claude Console organization with active API billing and access to the intended model.
- Create a key owned by the correct organization or project—not an unrelated personal account.
- Store it as a secret, commonly through the
ANTHROPIC_API_KEYenvironment variable or an approved credential helper. - Start Claude Code and confirm the active credential with
/status. - Monitor usage and rotate the key when its owner, environment, or exposure risk changes.
Do not paste the key into source files, prompts, tickets, or shared chat. Do not commit it to Git. For team automation, Anthropic also documents apiKeyHelper for obtaining dynamic or rotating credentials from an approved secret system.
An API key solves authentication and billing access. It does not provide a terminal, repository, permissions, or persistent workspace by itself. Those responsibilities belong to the surrounding harness and runtime, as explained in agent harness vs model.
What happens if you have both a subscription and an API key?
Credential precedence matters because an old shell variable can silently move usage to a different bill.
Anthropic's current order places supported cloud-provider credentials first when their provider flags are enabled. ANTHROPIC_AUTH_TOKEN follows, then ANTHROPIC_API_KEY, then configured helpers and subscription OAuth credentials.
In practical terms, an approved ANTHROPIC_API_KEY can take precedence over the Claude subscription login stored by /login. If the key belongs to an expired, disabled, or unexpected Console organization, requests can fail or appear on the wrong bill even though the user has an active Pro or Max subscription.
Use /status to check the active method. If the intention is to return to the subscription login, remove the ANTHROPIC_API_KEY variable from the current environment and any persistent shell or settings configuration, then confirm the status again.
Do not solve this by keeping several personal keys in copied configuration files. Record which workflow should use which identity and make the environment choose it deliberately.
Why Claude Code on the Web is different
Claude Code on the Web runs sessions in Anthropic-managed cloud environments. It connects the session to a Claude account, repository access, environment configuration, and the applicable subscription controls.
Anthropic states that Claude Code on the Web always uses subscription credentials. Setting ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN inside the sandbox does not replace the account credential used for the Web session.
That distinction creates a simple boundary:
- Local Claude Code: a Console API key can replace a Pro or Max login for supported work.
- Claude Code on the Web: use an eligible subscription account under the current Web requirements.
Related remote features can have their own rules. For example, Anthropic's current Remote Control documentation says API keys are not supported for that feature. Check each feature rather than assuming “Claude Code supports API keys” applies to every interface.
The Web product's plan eligibility and research-preview status can change, so do not purchase from a static third-party list. Verify the live Anthropic page on the day you need the feature.
What about Bedrock, Google Cloud, and Microsoft Foundry?
Anthropic's enterprise deployment overview documents several organization-managed providers for Claude Code. These routes can be appropriate when a company already centralizes identity, procurement, logging, regional infrastructure, or model access in a cloud platform.
They are not consumer subscription substitutes in the ordinary sense. They require cloud credentials, provider setup, model access, and billing under the organization's cloud account.
Choose a cloud-provider route when:
- the organization already governs model access through that provider;
- cloud IAM should control who can run Claude Code;
- billing and audit records need to remain in the cloud account;
- the required Claude model is available in the selected region and provider;
- administrators can distribute and maintain the necessary configuration.
Do not choose one merely because the individual user does not want Pro. The operational and administrative cost can be much greater than a personal subscription or direct Console API key.
An LLM gateway is another enterprise option, but it should be described precisely. Anthropic's gateway documentation covers routing Claude Code requests, authentication, tracking, budgets, and Claude model names through a compatible endpoint. It does not establish official support for arbitrary non-Claude models, nor does Anthropic endorse every third-party gateway's security or reliability.
What this page does not decide about price
Console API access answers whether supported local Claude Code can run without Pro or Max. It does not establish that API billing is cheaper. Subscription usage, eligible Usage Credits, Console API billing, cloud-provider billing, and an independent Workspace remain separate product ledgers.
Use the Claude Code pricing guide linked above for current rates and billing paths. Compare the same accepted task—including context, caching, tools, retries, and review—instead of comparing a subscription headline with a token rate in isolation.
Which access path should you choose?
Choose a Console API key when
- the work runs locally in Claude Code;
- usage should be metered to a Console organization;
- you can secure, monitor, and rotate the credential;
- you do not require a Web or remote feature tied to subscription OAuth;
- the intended Claude model is available to that API organization.
Choose a Pro or Max login when
- you want the individual subscription experience across eligible Claude surfaces;
- you need Claude Code on the Web or another feature requiring subscription credentials;
- you prefer the current subscription allowance and account experience;
- you do not want to administer a separate API project and key for interactive work.
Choose Team or Enterprise when
- centralized membership, policy, administration, and organization billing are part of the requirement;
- the seat and usage terms match the team's actual work;
- administrators need consistent controls rather than individual credentials.
Choose a supported cloud provider when
- the organization already owns that infrastructure and governance path;
- IAM, audit, procurement, or regional deployment requirements justify the setup;
- the selected provider and region offer the required Claude model.
The credential should follow the workflow and bill owner. Do not start with the cheapest-looking headline price and then force every requirement into that path.
If none of these access paths solves the reason you are leaving Claude Code, build the next shortlist with Claude Code alternatives organized by reason to switch.
A managed workspace is another product layer
A managed agent workspace organizes project files, sessions, runtimes, and collaboration. It is not a Claude subscription, Console API balance, Team seat, cloud-provider entitlement, or gateway credential.
Agent.Space is independent from Anthropic. It should not be described as an Anthropic partner, subscription reseller, shared account, or method to bypass region, payment, account, automation, or usage rules. Before starting a managed Claude Code workflow, verify current harness support, credential ownership, model choices, usage ownership, and plan terms in first-party product materials.
Once the login path works, tool connectivity is a separate setup step; add and verify MCP servers in Claude Code with the narrowest scope, credentials, and tool access the workflow requires.
The guide to how Agent.Space works explains the workspace role. If you are evaluating the equivalent OpenAI decision, see using Codex without a ChatGPT subscription; its local and cloud authentication rules are different.
Security checks before you use a non-subscription path
- Confirm the organization or cloud account that will receive the bill.
- Set budgets, alerts, and least-privilege access where the provider supports them.
- Keep keys out of repositories, prompts, screenshots, and logs.
- Use a credential helper or short-lived organizational mechanism when required by policy.
- Run
/statusbefore expensive or unattended work. - Check where source code, tool output, and session data are sent under the selected provider.
- Revoke credentials when a device, employee, project, or vendor relationship changes.
Authentication is part of the security boundary, not only a way to reach the model.
The takeaway
You can use local Claude Code without Pro or Max through a Claude Console API key, and organizations can use Anthropic's documented cloud-provider paths. Those routes still require a valid account, billing, supported model, and secure credentials.
Claude Code on the Web uses subscription credentials, and other remote features can have their own subscription requirements. Choose the execution surface first, make the bill owner explicit, and verify the feature under that exact authentication method before committing.
FAQ
Can I use Claude Code with only an API key?
Yes for supported local Claude Code workflows. Set a valid Console key through the documented environment or credential-helper path and confirm the active method with /status. The owning Console organization is billed at current API rates.
Is Claude Code free without Pro?
No. A Console API key creates usage-based charges. A supported cloud-provider route also bills through the organization's provider account.
Can I use an API key for Claude Code on the Web?
Anthropic says Web sessions always use subscription credentials. An API key placed in the sandbox does not replace the Web session's subscription identity.
Does an API key override my Claude subscription?
An approved ANTHROPIC_API_KEY ranks above stored subscription OAuth credentials in Anthropic's current authentication precedence. Use /status and remove the variable if you intend to return to subscription billing.
Can Claude Code use any model through a third-party gateway?
Do not assume that. Anthropic documents supported Claude deployments and compatible gateway behavior. A gateway URL alone does not prove official Claude Code compatibility with an arbitrary non-Claude model.
