"Your credit balance is too low to access the Anthropic API" means you don't have enough prepaid credits to pay for Claude API usage. In Claude Code, it appears as "Credit balance is too low". If you thought you were using a plan such as Pro or Max and still see it, the usual cause is that the API key in the ANTHROPIC_API_KEY environment variable takes precedence over your plan login, so you've been switched to API billing.

400 invalid_request_error
Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.

An example of the API response. It appears in this form in logs users have pasted on Claude Code's GitHub (an April 2025 report, an August 2026 report). Anthropic's list of API errors does not include this exact sentence.

There are almost always two causes. Tell them apart with /status first

Cause A

Your Console organization is out of credits

For people who mean to use an API key. Buy credits under Billing in the Claude Console, or turn on auto-reload.

Cause B

An API key is taking precedence over your plan

For people who mean to use Pro, Max, Team or Enterprise. Remove ANTHROPIC_API_KEY and restart Claude Code.

Run /status inside Claude Code and check the API key line to see which one you're in (the procedure in Claude Code's official error reference).

Based on Claude Code's official documentation and Anthropic's Help Center (checked October 26, 2026), this article explains what the error means, how to tell the causes apart, the two fixes, and how it differs from the monthly API credits included with Max and Team and from your plan's "usage credits". The causes are color-coded as A Balance and B API key.

1. What the error means and how it appears

The Claude API is prepaid, except for organizations on a sales contract that are invoiced at the end of the month. According to Anthropic's help article, usage of the API, the Playground and Claude Code through a Claude Console organization is deducted from credits you buy in advance, and once your credits run out, you can't call the API until you add more. This error tells you that you've hit that "not enough" state.

"Plans & Billing" at the end of the message refers to the Console's billing screen. In today's Console, you can check your balance and buy credits on the Billing page (platform.claude.com/settings/billing).

Where you see itWhat it shows
Calling the Claude API directlySDKs, curl, your own appHTTP 400, error type invalid_request_error, with the English message shown at the topBased on logs from user reports
Claude CodeTerminal, VS Code and other extensionsCredit balance is too lowAs written in the official error reference
Older versions of Claude CodeA user report from April 2025Credit balance too low · Add funds: https://console.anthropic.com/settings/billing

Sources: Anthropic, "How do I pay for my Claude API usage?"; Claude Code, "Error reference: Credit balance is too low". The older message is from a GitHub report. Checked October 26, 2026.

Claude Code's official error reference gives two causes: your Console organization's prepaid credits have run out, or you meant to use a subscription but requests are being sent with a Console API key. These are Causes A and B above.

2. Three questions to find the cause

Answer these in order, and you'll know which fix to follow.

  1. Q1 Do you mean to use Claude Code with a Pro, Max, Team or Enterprise plan?

    Yes Go to Q2. If you're running on your plan, this error shouldn't appear
    No (using an API key or your own app) Go to Q3
  2. Q2 Does /status show an API key?

    YesCause B An ANTHROPIC_API_KEY you approved is taking precedence over your plan → Section 4
    No Check the login method line. If you're logged in with a Console account, you're paying from the Console balance → run /login to sign back in with your plan account (step 5 in Section 4)
  3. Q3 Under Billing in the Console, does the key's organization have a balance?

    None or lowCause A Buy credits → Section 3
    Yes Check whether the key belongs to a different organization, whether you just bought the credits, and whether you only have Max or Team monthly credits and are using them for something they don't cover → FAQ

Basis for Q2: Claude Code's error reference tells plan users who see this error to check the API key line in /status. For switching when your login method is the Console, see Anthropic, "Use Claude Code with your Pro or Max plan" (if you're logged in through a pay-as-you-go Console account, switch to your plan with /login).

What you pay for a plan such as Claude Pro can't be used to pay for the API. Anthropic's help says the plans and the Console are separate products, and the API is billed separately (Why is Claude API usage billed separately from my paid Claude plan?). Even with a plan, you need a Console balance while you're running on an API key.

3. Cause A Add credits

This is the fix for people using an API key. Only members with the Admin or Billing role in the Console organization can buy credits. If it's your company's organization, ask an administrator.

  1. Open the Billing page Log in to the Console and open Billing. The organization's credit balance and the amount used appear on the same page. If you belong to more than one organization, make sure you've selected the organization where the failing key was created. Balances are per organization, and every API key in the same organization draws on the same balance.
  2. Buy credits Click "Buy credits", enter an amount and confirm. According to the help article, purchased credits are available right away.
  3. Turn on auto-reload (optional) In the Credit balance section, use "Set up auto-reload" to enter the balance that triggers a reload (When credit balance reaches) and the balance to reload to (Bring credit balance back up to), then click "Turn on". If your balance is already at or below that amount, the button becomes "Turn on and purchase" and the purchase happens on the spot.
  4. Retry what failed In Claude Code, send the same instruction again.

Source: Anthropic, "How do I pay for my Claude API usage?" (purchase steps, immediate availability, auto-reload setup, expiry one year after purchase, no refunds). Checked October 26, 2026.

Purchased credits expire one year after the purchase date and can't be refunded. Buying only what you'll use and letting auto-reload top you up when you run low is likely to waste less. Claude Code's error reference also recommends setting per-workspace spend limits in the Console so that a single project doesn't drain the organization's balance.

4. Cause B Remove the API key and use your plan

This is the fix for people who mean to use a Pro, Max, Team or Enterprise plan. When several credentials are present, Claude Code picks one in a fixed order, and the ANTHROPIC_API_KEY environment variable and apiKeyHelper in a settings file rank above the plan login you set up with /login. When the key is used, as Anthropic's help explains, you're billed pay-as-you-go to that key's organization, and if that organization has no balance, you're stopped with this error.

  1. Check with /status Run /status inside Claude Code and look at the API key line. When both a login and an API key are present, the one not in use is marked.
  2. Remove it from the current shell Remove the variable from the terminal you have open (commands below).
  3. Remove where the key comes from Find and delete the export ANTHROPIC_API_KEY=... line in your shell config file, the Windows user environment variable, and any entry in your PowerShell profile ($PROFILE). If you don't, the next terminal you open will load it again. According to the official error reference, tools such as direnv or an IDE's terminal may load the key from a project's .env file, so check the .env in your project folder too. How to find it in env or apiKeyHelper in Claude Code's settings files is covered in our article on "claude.ai connectors are disabled".
  4. Reopen the terminal and start claude The official help lists changing environment variables without reopening the terminal as a common mistake.
  5. Run /login if needed, then /status again If you aren't logged in with your plan account yet, run /login. Once /status confirms that no API key is in use, you're done.
# macOS / Linux: check whether it's set
env | grep ANTHROPIC
# Remove it from the current shell
unset ANTHROPIC_API_KEY
# Find which config file sets it
grep -n ANTHROPIC_API_KEY ~/.zshrc ~/.bashrc ~/.bash_profile ~/.profile 2>/dev/null

# Windows (PowerShell): check whether it's set
Get-ChildItem Env:ANTHROPIC*
# Remove it from the current shell
Remove-Item Env:ANTHROPIC_API_KEY

# Windows (Command Prompt): check whether it's set
echo %ANTHROPIC_API_KEY%
# Remove it from the current shell
set ANTHROPIC_API_KEY=

On Windows, remove persistent settings from the user variables under "System Properties" → "Advanced" → "Environment Variables". Sources: Anthropic, "Manage API key environment variables in Claude Code"; Claude Code, "Authentication precedence" and "Error reference" (the check commands and .env are in the "Invalid API key" entry). Checked October 26, 2026.

If you don't want to delete the key, you can revoke your approval instead. When Claude Code is started interactively, it asks once whether to use ANTHROPIC_API_KEY the first time it finds it, and remembers your answer. To change it later, toggle "Use custom API key" in /config (this option appears only while the variable is set). However, with claude -p (non-interactive), the key is always used if it's present. If other scripts need the key, pass it only when running those commands.

If it appears in the VS Code extension

In the Claude Code extension for VS Code, you check the same things. Type /status in the panel to see your account and other details (Claude Code v2.1.280 or later). According to the official documentation, VS Code launched from a terminal with code . inherits that shell's environment variables. If the key is in your terminal's config file, it may reach the extension too. After removing the key, close and reopen VS Code before checking.

You can also set environment variables in the extension's claudeCode.environmentVariables setting. In Settings, under Extensions → Claude Code, check that ANTHROPIC_API_KEY isn't set there.

Source: Claude Code, "Use Claude Code in VS Code" (inheriting environment variables, the environmentVariables setting, /status). Checked October 26, 2026.

5. What's paying for your usage

There are three things called "credits", and mixing them up leads to misreading this error: API credits bought in the Console, the monthly API credits included with Max and Team, and usage credits, which pay for usage beyond your Pro or Max plan's limits. Here's what each kind of use can be paid with.

How you use itPlan usage allowanceUsage creditsCredits bought in the ConsoleMax/Team monthly API credits
Claude Code (logged in with a plan)UsedAfter limitsNot usedNot covered
Claude Code (API key, interactive)Not usedNot usedUsedNot covered
claude -p and the Agent SDK (run yourself with an API key)Not usedNot usedUsedUsed
Claude API from your own appNot usableNot usableUsedUsed

Sources: Anthropic, "Monthly API credits for Max and Team plans" (interactive Claude Code and usage credits are not covered; claude -p and the Agent SDK run yourself with an API key are covered); "Manage usage credits for paid Claude plans" (usage credits apply to both Claude and Claude Code after your plan's limits, and are separate from the monthly API credits); "Manage API key environment variables in Claude Code" (if an API key is present, you're billed pay-as-you-go to that key's organization); "How do I pay for my Claude API usage?". Checked October 26, 2026.

What matters for this error is the two right-hand columns (your Console organization's balance). Three things follow from the table.

  • If you see it while you think you're on your plan, you're in one of the API key rows. Adding to your plan or usage credits (the two left-hand columns) won't fix it, however much you add (Cause B).
  • Max and Team monthly API credits can't be used for interactive Claude Code. Even if your plan's credits still show on the Console balance screen, they can't pay for running interactive Claude Code with an API key. How to claim them and the order they're used in are covered in our article on Max and Team API credits.
  • Usage credits are a separate balance in claude.ai's settings (Settings → Usage). Because they're separate from the Console balance, topping them up doesn't help with API key usage.

6. Similar but different errors

Other errors also relate to balances or limits. Tell them apart by how the message begins.

Message starts withMeaningFix
You have reached your specified API usage limitsYou've hit a spend limit you set yourself for an organization or workspace (400)For a workspace limit, it says specified workspace API usage limits. In Claude Code, a workspace limit can also come back as a 429Raise or remove the limit in the Console
You have reached your API usage limitsYou've hit the monthly limit for your usage tier (429)Wait until the start of next month (UTC), or apply for a higher tier
You've hit your session limitYou've used up Pro or Max's 5-hour allowanceWait for the allowance to reset, or use usage credits (our article on usage limits)
Invalid API key, This organization has been disabledAn old key in an environment variable was rejectedRemove the key and run /login (our article on auth and login errors)

Sources: Claude API, "Rate limits" (the two spend-limit errors); Claude Code, "Error reference". Checked October 26, 2026.

For a list of other Claude Code errors, see Claude Code Common Errors and Fixes.

Summary

  • "Your credit balance is too low to access the Anthropic API" means your Console organization doesn't have enough prepaid credits. In Claude Code, it appears as "Credit balance is too low"
  • The cause is either A your balance really is too low, or B you meant to use your plan but ANTHROPIC_API_KEY has put you on API billing. Tell them apart with /status
  • For A, buy credits under Billing in the Console. Auto-reload makes interruptions less likely
  • For B, remove the key from your environment variables and settings files, reopen the terminal (or VS Code), and confirm with /status
  • Max and Team monthly API credits can't be used for interactive Claude Code, and your plan's usage credits are separate from the Console balance

FAQ

Q. Is there a free tier for the Claude API?

A. The official help doesn't mention a free tier. After you create a Console organization, the guidance is to "add credits to your organization's balance to use the API and the Playground" (I created a Claude Console organization - how do I start using the Claude API?). The exception is the monthly API credits included with the Max and Team plans; the Free, Pro and Enterprise plans aren't eligible.

Q. I have Claude Pro. Why am I getting this error?

A. Because Claude Code is running on an API key. Your plan's fee can't pay for the API, so if the API key's organization has no balance, you get this error. Check with /status whether an API key is in use, and remove it following the steps in Section 4.

Q. I bought credits, but I still get the error.

A. According to the help article, purchased credits are available right away. First, check that the organization where you created the key is the same one you bought credits for. Anthropic's status page records an incident on September 1, 2026 (UTC) in which purchased credits were slow to apply for users whose balance had hit zero, and some API requests wrongly returned "credit balance is too low" (Delays in credit purchases). On October 1 of the same year, there was another incident in which purchases were slow to apply (Delayed credits on the Claude Platform). If the organization matches and the balance is showing, check status.claude.com for an ongoing incident.

Q. I still have Max monthly API credits, but I get this error in Claude Code.

A. Monthly API credits can't be used for interactive Claude Code in the terminal, IDE, desktop app or on the web (the table in Section 5). To use your plan, remove the API key and use your login; to use an API key, buy credits in the Console.