Claude Code "Credit balance is too low" on a paid plan
On Pro or Max, "Credit balance is too low" almost always means Claude Code is sending your requests with an API key whose Console organisation has no prepaid credits, so your subscription isn't being used at all. Remove the key from your shell profile, settings files and CI, restart Claude Code and check /status.
Contents
On Pro or Max, Claude Code's "Credit balance is too low" error almost always means it isn't using your subscription. It is sending requests with an API key, from an ANTHROPIC_API_KEY or an apiKeyHelper left in your shell profile, IDE, CI job or a settings file, and that key's Console organisation has no prepaid credits. Remove the key and your plan takes over.
Anthropic's error reference gives both causes in one sentence: "Your Console organization has run out of prepaid credits, or Claude Code is sending your requests with a Console API key when you meant to use your subscription." The longer text that turns up in logs and bug reports is the API's own: "Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits." A Pro subscriber filed exactly that as issue #5300 in August 2025.
Why a Pro or Max plan gets a credit balance error#
A subscription and the Claude Console are billed separately. Your plan's usage has no credit balance in the Console, so the error comes from the Console side: a Console API key, or a Console sign-in, whose organisation has run out of prepaid credits.
Claude Code picks one credential for a session, and the authentication docs rank them: cloud provider settings first, then ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, an apiKeyHelper script, CLAUDE_CODE_OAUTH_TOKEN and an Anthropic profile named in ANTHROPIC_PROFILE. The subscription login you made with /login comes last, so anything higher on the list is used before it.
With ANTHROPIC_API_KEY set, Anthropic's help page says "Claude Code will use this API key for authentication instead of your Claude subscription". In an interactive session you are asked once whether to use the key and your answer is remembered. With -p you aren't asked.
Once that organisation has credits, the same key stops failing and bills you per token instead. Claude Code using your API key, not your plan is about that quieter case.
How to fix "Credit balance is too low" on Pro or Max#
- Run
/statusin Claude Code and look at theAPI keyrow. When a login and a key are both set up,/statusmarks the one that isn't in use. From a shell,claude auth statusprints JSON whoseauthMethodreadsapi_keyorapi_key_helperwhen a key is in charge, andclaude.aifor your subscription. - Remove the key everywhere it is set: the current shell (
unset ANTHROPIC_API_KEY), your shell profile, theenvblock orapiKeyHelperin a Claude Code settings file, and a project.envthat direnv, a dotenv plugin or an IDE terminal loads for you. A key in a settingsenvblock overwrites the one in your shell, per the settings reference, so check those files even after the shell is clean. Claude Code using your API key, not your plan has the commands for every shell and file, Windows included. - Open a new terminal and start
claude. Run/loginif you have never signed in with your subscription, or if/statusshows a Console account instead of your plan. Running/loginbefore the key is gone doesn't help, because the key still outranks it. - Run
/statusagain and confirm the active credential is your subscription.
If other tools need the key exported, you can keep it and switch it off for Claude Code alone; the same guide shows how, and why that doesn't cover claude -p (next section). Our Claude Code environment variables table lists the other variables that change which account gets billed.
Why claude -p fails when interactive sessions work#
This one catches people who declined the key once and forgot. In non-interactive mode (-p), Anthropic's precedence docs say "the key is always used when present". So the chat window runs on Max while a script started from the same shell bills an empty Console organisation.
--bare goes further: "In bare mode, Claude Code never reads OAuth credentials or the system keychain" (headless docs). A bare run needs ANTHROPIC_API_KEY or an apiKeyHelper, so on a subscription you either drop --bare or fund the key. The flags and their cost caps are in our Claude Code headless mode guide.
What should authenticate CI and scripts#
For a job that should run on your subscription, the docs point to claude setup-token. It prints a one-year OAuth token (Pro, Max, Team or Enterprise) that you store as CLAUDE_CODE_OAUTH_TOKEN. In Anthropic's GitHub Action you pass it as claude_code_oauth_token instead of anthropic_api_key. Three catches:
ANTHROPIC_API_KEYranks aboveCLAUDE_CODE_OAUTH_TOKEN, so a job that exports both uses the key.- Bare mode doesn't read
CLAUDE_CODE_OAUTH_TOKEN. - For a secret shared across repositories, the GitHub Actions docs recommend an API key, because an OAuth token is tied to the subscription of whoever ran
setup-token.
Which one fits scripts, CI and products other people use is covered with prices in Claude Code: API key or subscription?.
If you meant to pay with an API key#
Then the message is literal: the Console organisation ran out of prepaid credits. Add credits at platform.claude.com/settings/billing, where you can also turn on auto-reload. The error reference also suggests per-workspace spend caps, so one project can't drain the whole organisation's balance.
A key from a disabled organisation shows a different error, and a login that keeps expiring is another problem again: both are in Claude Code keeps asking you to log in.
How Shuriken keeps a key off your subscription#
In Shuriken, a subscription sign-in and an API key are separate sources, and the agents Shuriken starts don't inherit ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN or the other keys and tokens your shell exports. So a chat on your Pro or Max sign-in can't end up on an empty Console organisation because of a line in ~/.zshrc.
A key takes chats only when you pick it, or once every subscription is out if Switch to API keys is on (it's off by default). Each such fallback run stops at its spend cap, $25 by default, and a Switched to … card names the source that took over. API keys as a last resort explains how the cap counts, and source switching covers how chats move between your sources. To try it with your own plans and keys, download Shuriken.
Sources
- Claude Code docs: Error reference, Credit balance is too low (accessed 24 October 2026)
- Claude Code docs: Authentication precedence (accessed 24 October 2026)
- Claude Help Center: Using Claude Code with your Pro or Max plan (accessed 24 October 2026)
- Claude Code docs: Run Claude Code programmatically (bare mode) (accessed 24 October 2026)
- Claude Code docs: Settings reference (env, apiKeyHelper) (accessed 24 October 2026)
- Claude Code docs: CLI reference (claude auth status) (accessed 24 October 2026)
- Claude Code docs: GitHub Actions (accessed 24 October 2026)
- GitHub issue #5300: PRO account shows Credit balance is too low (accessed 24 October 2026)
Frequently asked questions
Will adding Console credits fix it on a Max plan?
The error goes away, but every turn is then billed per token from those credits instead of your plan. If you meant to use Max, remove the API key so your subscription carries the work.
Why didn't /login fix it?
Because ANTHROPIC_API_KEY and an apiKeyHelper both rank above the login you make with /login. While either one supplies a key, Claude Code keeps using it. Remove the key first, then run /login.
Why does claude -p say credit balance too low when my normal sessions work?
In an interactive session you can decline an exported key once and Claude Code remembers. With -p there is no prompt: Anthropic's docs say the key is always used when present. With --bare, your subscription login isn't read at all.
Is this the same as hitting my plan's usage limit?
No. A plan limit reads like "You've hit your session limit · resets 3:45pm", and usage credits on a plan have their own spend-limit messages. "Credit balance is too low" is about prepaid credits in a Claude Console organisation.
Can a CI job use my subscription instead of an API key?
Yes. Run claude setup-token and store the token as CLAUDE_CODE_OAUTH_TOKEN, or pass it to the GitHub Action as claude_code_oauth_token. Leave ANTHROPIC_API_KEY unset in that job, because it ranks above the token.