API Error: 400 This organization has been disabled (Claude Code)
Claude Code is using an ANTHROPIC_API_KEY from a disabled Console organization, and that key overrides your subscription login. Unset it, or use a key from an active organization.
Summary
- A key exported in your shell profile or loaded from .env wins over /login, even with a working Pro, Max or Ultra subscription.
- In -p mode the key is always used when it is present.
- Unset ANTHROPIC_API_KEY, remove it from your shell profile, relaunch claude and check /status.
- If no key is set and the error stays, the account itself is affected; contact support or sign in with another account.
On this page
A stale key is overriding your login
Claude Code prints one of these:
API Error: 400 ... This organization has been disabled.
Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your subscription instead
Your ANTHROPIC_API_KEY belongs to a disabled organization · Update or unset the environment variable
All three mean the same thing. According to the Claude Code error reference, Claude Code is using an ANTHROPIC_API_KEY from a Claude Console organization that has been disabled. A key exported in your shell profile or loaded from .env takes priority over /login, even when you also have a working Pro, Max or Ultra subscription. In non-interactive mode (-p) the key is always used when it is present.
Remove the key
Unset it in the current shell:
unset ANTHROPIC_API_KEY
Then delete the line that sets it from your shell profile or .env (on Windows, from your user environment variables), open a new terminal and start claude again. Run /status and confirm the active credential is your subscription.
The hint after · tells you which case you are in:
Unset the environment variable to use your subscription instead: you have a saved/login, which takes over as soon as the key is gone.Update or unset the environment variable: the key was your only credential. Unset it and run/login, or setANTHROPIC_API_KEYto a key from an active Console organization.
If no key is set
When ANTHROPIC_API_KEY is not set anywhere and the 400 continues, the problem is with the account you are signed in with. The error reference's advice is to contact Anthropic support or sign in with a different account. If the key came from a colleague, an employer or a gateway, ask them; the organization is theirs.
A related hold asks for ID instead of disabling the organization; see Identity verification is required to continue. If the organization is active but hit a spend limit, the message is You have reached your specified API usage limits. Other 400s are on our Claude Code API Error 400 page.