The error says one thing. An administrator of the Anthropic organization tied to your email has turned off Pro or Max sign-in to Claude Code. Your personal account and your payment have nothing to do with it: the switch sits at the organization level, and Claude Code only reports it. The quickest way back to work is an API key, your own or one from a gateway such as codexkey. The subscription login is not needed at all.
What this Claude Code error means
The full text looks like this:
Your organization has disabled Claude subscription access for Claude Code.
Use an Anthropic API key instead, or ask your admin to enable access.
Claude Code has two independent ways to sign in. The first is the subscription: an OAuth login through Pro or Max that is tied to an organization. The second is an API key, direct authentication with no organization involved. The message appears when an administrator has closed the first path and you have not set up the second. It is not a bug or a temporary outage. Anthropic itself added the switch to the organization console so that companies can decide centrally who gets subscription access and who moves to pay-per-use API billing.
Why organizations turn off subscription access
The reason is almost always the same: control over spend and traffic. Claude Max has a fixed price no matter how many tokens an employee burns, so for a company with dozens of developers a subscription turns into a lottery. One engineer running aggressive agent loops can consume more than the rest of the department. API billing removes the problem: you pay for the tokens actually used, see a breakdown by key and by person, and set a limit for each.
The second reason is rarer but real: compliance. Some companies allow external AI services only through a single gateway with logging, and an employee's personal subscription does not fit that setup.
Neither reason has anything to do with how you behaved. An administrator flips the switch for the whole organization, not for particular people.
How to enable access if you are the administrator
You need administrator rights in the Anthropic console.
- Open
console.anthropic.comand sign in with an account that has the Owner or Admin role. - Go to the organization settings. Usually that is "Organization settings" or "Members".
- Find the switch for Claude Code subscription access. The wording is close to "Claude Code subscription access" or "Allow Pro/Max login for Claude Code".
- Turn it on for the whole organization or for specific roles, if the console allows it.
- Ask the employee to restart
claudeand sign in again.
The change takes effect almost immediately, and nobody has to recreate an account. If the interface has no such switch, your Anthropic plan does not offer granular control, and the only route left for employees is to move to API keys.
How to keep working with an API key
First, an honest question: whose code is it? If the project is work code, the organization may have disabled subscriptions precisely so that company code does not leave for outside services unchecked. In that case connect a key only with the approval of IT or security, or you can easily break internal rules. For personal projects, and wherever IT does not object, switch to an API key. Claude Code works just as well with a key as with a subscription. They are two parallel authentication mechanisms, and an organization cannot switch off the second one if the key is your own.
There are two kinds of key:
- A direct Anthropic key (
sk-ant-…): fits if you or your company have a separate API billing account that the subscription restriction does not touch. - A codexkey key (
sk_cdx_…): fits if you have no Anthropic account at all, or do not want to create one for a single developer. For more on reaching Claude without an Anthropic account, see Claude account banned or blocked: the same logic applies to organization-level restrictions.
How to configure Claude Code with ANTHROPIC_BASE_URL
On every launch Claude Code reads the environment variables ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, and takes its models from the ANTHROPIC_DEFAULT_* lines. When these are set, the subscription login is bypassed entirely.
macOS / Linux
export ANTHROPIC_BASE_URL="https://api.codexkey.online"
export ANTHROPIC_AUTH_TOKEN="sk_cdx_YOUR_KEY"
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5-5[1m]"
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5[1m]"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-sonnet-5"
Put these lines in ~/.zshrc or ~/.bashrc and run source ~/.zshrc so that new terminal sessions pick up the variables. The ANTHROPIC_DEFAULT_* lines are required: without them Claude Code asks for its own default models and answers "There's an issue with the selected model".
Windows (PowerShell)
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.codexkey.online", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk_cdx_YOUR_KEY", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_OPUS_MODEL", "claude-opus-5-5[1m]", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_SONNET_MODEL", "claude-sonnet-5[1m]", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_HAIKU_MODEL", "claude-sonnet-5", "User")
Close the PowerShell window and open a new one: a process reads environment variables again only when it starts.
One session only, without touching your profile
ANTHROPIC_BASE_URL=https://api.codexkey.online ANTHROPIC_AUTH_TOKEN=sk_cdx_YOUR_KEY \
ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5-5[1m]" ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5[1m]" \
ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-sonnet-5" claude
Now run claude in your project: the agent connects with the key rather than the organization's subscription. Installing Claude Code on each OS, including Windows without administrator rights, is covered in detail in Claude Code in Russia: install and setup.
You get a codexkey key in your account. Register, top up your balance through SBP (the Russian Faster Payments System) or with a Russian bank card (minimum $1), then open the "API keys" section and click "Create Key". Top-up bonuses currently apply: +5% from $10, +7.5% from $20, +15% from $100. Model rates and payment methods are on the pricing page, and every way to pay from Russia, SBP and cards included, is described in How to pay for Claude from Russia.
How an API key differs from subscription sign-in
A Pro or Max subscription costs a fixed amount per month, comes with internal usage limits, and is tied to an account and, if the admin decided so, to an organization. An API key is paid for as you go, per token: there is no monthly ceiling, and organization sign-in policies do not reach it. In Claude Code the difference is barely visible, since the agent reads the repository, edits files and runs tests the same way. What differs is billing, and who can cut off your access with one switch in a console.
Did you have a working Anthropic key, with the organization restricting only subscription sign-in? The key keeps working unchanged. No Anthropic account at all? A codexkey key covers the same case with separate billing that does not depend on Anthropic's organization settings.
FAQ
Why did the organization disable it for me and not my colleague?
Most likely not for you personally: the switch in the Anthropic console is set for a whole organization or a group of roles, not for one person. If your colleague's subscription still works, they may sign in through a different organization, or already have an API key set up, so the restriction does not affect them.
Can I keep a Pro subscription and an API key at the same time?
Yes, they are independent authentication mechanisms. Claude Code uses the one configured in the current environment: when ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN are set, the key takes priority, even with an active Pro subscription.
Do I need an Anthropic account to get a codexkey key?
No. Signing up for codexkey does not require an Anthropic account, and nobody checks whether you belong to an organization in the Anthropic Console. The sk_cdx_… key works regardless of what happens to your subscription access.
What if my organization has no Anthropic console at all?
Then the subscription was set up without a corporate plan, and there is no organization access switch to begin with. The error is unlikely in that case. If it still appeared, check whether an organization was created automatically for your email when you signed up with a work address.
How can I tell that a key is connected and not the subscription?
Run claude and look at the first line of the interface, or run echo $ANTHROPIC_BASE_URL. If it prints https://api.codexkey.online, Claude Code is working through the key. If the variable is empty, the agent is trying to sign in with the subscription and will hit the organization's restriction again.
Does this error appear in claude.ai as well as in Claude Code?
This wording belongs to Claude Code, because only there is there a separate subscription login through an organization. In the claude.ai web app a restriction of the same kind looks different: usually a refusal to sign in at all, with no mention of an API key as an alternative.