# Claude Code "Credit balance is too low" on a paid plan

> On Pro or Max, Claude Code's Credit balance is too low error means it is using an API key with no Console credits, not your plan. Find the key, remove it.

Source: https://shuriken.sh/guides/claude-code-credit-balance-too-low

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.

By Shuriken Updated 27 October 2026 5 min read

**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](https://code.claude.com/docs/en/errors#credit-balance-is-too-low) 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](https://github.com/anthropics/claude-code/issues/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](https://code.claude.com/docs/en/authentication#authentication-precedence) 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](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan) 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](https://shuriken.sh/guides/claude-code-using-api-key-instead-of-subscription) is about that quieter case.

## How to fix "Credit balance is too low" on Pro or Max #

- Run /status in Claude Code and look at the API key row. When a login and a key are both set up, /status marks the one that isn't in use. From a shell, claude auth status prints JSON whose authMethod reads api_key or api_key_helper when a key is in charge, and claude.ai for your subscription.
- Remove the key everywhere it is set: the current shell (unset ANTHROPIC_API_KEY), your shell profile, the env block or apiKeyHelper in a Claude Code settings file, and a project .env that direnv, a dotenv plugin or an IDE terminal loads for you. A key in a settings env block overwrites the one in your shell, per the [settings reference](https://code.claude.com/docs/en/settings-reference), so check those files even after the shell is clean. [Claude Code using your API key, not your plan](https://shuriken.sh/guides/claude-code-using-api-key-instead-of-subscription) has the commands for every shell and file, Windows included.
- Open a new terminal and start claude. Run /login if you have never signed in with your subscription, or if /status shows a Console account instead of your plan. Running /login before the key is gone doesn't help, because the key still outranks it.
- Run /status again 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](https://shuriken.sh/guides/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](https://code.claude.com/docs/en/headless)). 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](https://shuriken.sh/guides/claude-code-headless-mode) guide.

Shuriken shows what every plan you hold has left in one figure, and what each turn costs as it runs.

[Download](https://shuriken.sh/download)

## 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_KEY ranks above CLAUDE_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](https://code.claude.com/docs/en/github-actions) 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?](https://shuriken.sh/guides/claude-code-api-vs-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](https://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](https://shuriken.sh/guides/claude-code-keeps-asking-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](https://shuriken.sh/blog/api-keys-last-resort) explains how the cap counts, and [source switching](https://shuriken.sh/features/source-switching) covers how chats move between your sources. To try it with your own plans and keys, [download Shuriken](https://shuriken.sh/download).

Share

[X](https://x.com/intent/post?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-credit-balance-too-low&text=Claude%20Code%20%22Credit%20balance%20is%20too%20low%22%20on%20a%20paid%20plan)[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-credit-balance-too-low)[Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-credit-balance-too-low&t=Claude%20Code%20%22Credit%20balance%20is%20too%20low%22%20on%20a%20paid%20plan)[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-credit-balance-too-low&title=Claude%20Code%20%22Credit%20balance%20is%20too%20low%22%20on%20a%20paid%20plan)[E-mail](mailto:?subject=Claude%20Code%20%22Credit%20balance%20is%20too%20low%22%20on%20a%20paid%20plan&body=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-credit-balance-too-low)

## Sources

- [Claude Code docs: Error reference, Credit balance is too low](https://code.claude.com/docs/en/errors#credit-balance-is-too-low) (accessed 24 October 2026)
- [Claude Code docs: Authentication precedence](https://code.claude.com/docs/en/authentication#authentication-precedence) (accessed 24 October 2026)
- [Claude Help Center: Using Claude Code with your Pro or Max plan](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan) (accessed 24 October 2026)
- [Claude Code docs: Run Claude Code programmatically (bare mode)](https://code.claude.com/docs/en/headless) (accessed 24 October 2026)
- [Claude Code docs: Settings reference (env, apiKeyHelper)](https://code.claude.com/docs/en/settings-reference) (accessed 24 October 2026)
- [Claude Code docs: CLI reference (claude auth status)](https://code.claude.com/docs/en/cli-reference) (accessed 24 October 2026)
- [Claude Code docs: GitHub Actions](https://code.claude.com/docs/en/github-actions) (accessed 24 October 2026)
- [GitHub issue #5300: PRO account shows Credit balance is too low](https://github.com/anthropics/claude-code/issues/5300) (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.

Fuel

All your plans, in one fuel gauge.

Shuriken adds up what your subscriptions have left, one figure per provider and per limit, in the top bar.

[Download](https://shuriken.sh/download)

[Other platforms](https://shuriken.sh/download#main)

## Keep reading

- [Claude Pro vs Max for Claude Code: Guide 27 Oct 2026 5 min read Pro suits a few Claude Code sessions a week; Max suits daily heavy use and parallel agents. Prices, limits, the signs you've outgrown Pro, and upgrading.](https://shuriken.sh/guides/claude-pro-vs-max-for-claude-code)
- [Claude Code 1M context window: when it helps, what it costs: Guide 27 Oct 2026 4 min read Opus 4.7+, Sonnet 5+, Haiku 5.5 and Fable run with a 1M context in Claude Code by default. Why a huge session costs more every turn, and when /clear wins.](https://shuriken.sh/guides/claude-code-1m-context-window)
- [Claude Code with Amazon Bedrock or Google Vertex AI: Guide 27 Oct 2026 7 min read Run Claude Code with Amazon Bedrock or Vertex AI: the env vars, the model IDs to pin, IAM, and what works differently from a Claude plan.](https://shuriken.sh/guides/claude-code-bedrock-vertex)
- [What Claude Code costs per developer, per month: Guide 27 Oct 2026 5 min read Claude Code cost per developer per month: Anthropic's average is $150 to $250 at API rates. How it compares with Pro, Max and Team seats, with the maths.](https://shuriken.sh/guides/claude-code-cost-per-developer)
- [Claude Max 5x vs 20x (2026): what you really get: Guide 27 Oct 2026 6 min read Claude Max 20x gives 20 times Pro's 5-hour allowance and Max 5x five. Anthropic publishes no weekly multiplier; users report 20x at 1.5 to 2 times 5x.](https://shuriken.sh/guides/claude-max-vs-max-20x)
- [Claude Team seats for Claude Code, explained: Guide 27 Oct 2026 5 min read Team Standard seats get 1.25x Pro's usage per session, Premium 6.25x, each with a 5-hour and weekly limit. Prices, Team vs Max, and a personal plan.](https://shuriken.sh/guides/claude-team-seats-for-claude-code)
- [Opus vs Sonnet for coding: which Claude model to use: Guide 27 Oct 2026 6 min read Opus vs Sonnet for coding: Sonnet 5.5 for well-scoped work, Opus 5.5 for long or open-ended jobs. Opus costs twice as much per token; judge it per task.](https://shuriken.sh/guides/opus-vs-sonnet-for-coding)

## Free tools

- [Claude limit reset tracker](https://shuriken.sh/tools/limit-resets/claude)
- [Codex limit reset tracker](https://shuriken.sh/tools/limit-resets/codex)
