Fix "Your credit balance is too low to access the Anthropic API"
Last updated
The Anthropic API sends this message when the Claude Console organization behind your API key has run out of credits:
Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.To fix it, buy credits on the Billing page of the Claude Console, in the organization your key belongs to. If you saw it in Claude Code and you pay for a Claude plan, don't buy anything yet. First check whether Claude Code is using an API key instead of your plan. Both cases are below.
Everything here was checked against its sources on November 13, 2026. Most of it comes from Anthropic's docs, linked under each section. Where the docs are silent, the page says so and links to dated reports from developers.
The short version
- Your own code, or a tool you gave an API key: open the Billing page in the Claude Console and look at the credit balance. Check that you're in the organization the key belongs to, then buy credits. Anthropic says purchased credits are available immediately.
- Claude Code with a Pro, Max, Ultra, Team or Enterprise plan: run
/statusand check the API key row. If an API key is in use, unsetANTHROPIC_API_KEYand start Claude Code again. Run/loginif you haven't signed in with your plan yet. - Don't retry it. The request fails the same way until the organization has credits.
What the message means
Most organizations pay for the Claude API with prepaid credits. Anthropic's billing article says: “If you run out of credits, you can no longer call the API or use the playground until you add more.” The balance is per Claude Console organization. It isn't per API key, and it isn't your Claude plan.
Anthropic's developer docs show the full message on one page only: the page about the monthly API credits that come with Max, Ultra and Team plans. It says requests return this message when the balance is exhausted.
Claude Code shows a shorter message, and Anthropic's docs write it two ways: Credit balance is too low in the Claude Code error reference, and Credit balance too low on the page about plan credits and in the Claude Code changelog. The error reference gives two causes: 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 status code: what the docs list and what developers report
Anthropic's API errors page doesn't mention this message. For billing problems it lists status 402 with the type billing_error: “There’s an issue with your billing or payment information.”
The responses developers post look different: status 400 with the type invalid_request_error, the same type as a malformed request. A developer posted this one on GitHub on September 17, 2026, on an issue in Anthropic's TypeScript SDK repository:
HTTP 400
{"type":"error","error":{"type":"invalid_request_error",
"message":"Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits."},
"request_id":"req_011Cf75wfCXCbniKKrP6wSut"}When that issue was closed on April 27, 2026, a collaborator on the repository wrote that the API “now returns a distinct billing error type”, and that the SDK surfaces it as BillingError. The response above was posted after that, and it is still a 400.
Another developer wrote on November 7, 2026 that every prompt in interactive Claude Code failed with 400 invalid_request_error and the first sentence of this message. And a contributor to Anthropic's Python SDK repository wrote on August 6, 2026, when closing a request for a dedicated error type, that credit exhaustion “currently comes back as a generic 400 invalid_request_error distinguishable only by its message text”. They added: “We'll take it under consideration internally”. So handle both: a 402, and a 400 with this message.
Sources: Anthropic, API credits for Max, Ultra, and Team plans, Anthropic, Errors, Claude Code, Error reference, Changelog, Claude Help Center, How do I pay for my Claude API usage?
You pay for Claude Pro or Max and still see it
A Claude plan and the Claude API are billed separately. Anthropic puts it this way: “A paid Claude subscription enhances your chat experience, and the Claude API is billed separately.” You can have a Claude account and a Console account with the same email address, and Anthropic says: “These two accounts will operate independently.”
Anthropic's docs describe these ways to pay for a plan and still get this error:
- You use an API key. An API key belongs to a Console organization, and prepaid credits in that organization pay for its requests. That goes for your own code and for any tool you gave the key to. A Pro plan includes no API credits.
- Claude Code is using an API key instead of your plan. Anthropic says: “Claude Code prioritizes environment variable API keys over authenticated subscriptions.” If
ANTHROPIC_API_KEYis set and you approved the key once, Claude Code remembers that choice, and you're charged at API rates on that key's account, even while you're logged in with your plan. In non-interactive mode (-p), the key is always used when it's set. Run/statusand check the API key row. To go back to your plan, unset the variable in your shell and remove it from your shell profile, then start Claude Code again. Run/loginif you haven't signed in with your plan yet. - Your plan's monthly API credits don't cover interactive Claude Code. Max, Ultra and Team plans include monthly API credits, which go to a Console organization you link to the plan. They cover the Claude API, Claude Managed Agents, the Claude Agent SDK and the playground. Anthropic's developer docs say they don't cover Claude Code. Anthropic's Help Center article on monthly API credits draws the line more narrowly: interactive Claude Code isn't covered, but
claude -pis when you run it yourself with an API key from the linked organization. If these are the only credits in the organization and you use the key in Claude Code, Anthropic's docs say Claude Code displaysCredit balance too low · Add funds: https://platform.claude.com/settings/billing. So the Console can show a balance while Claude Code says it's too low. Credits you buy do cover Claude Code. - Your monthly API credits are used up. They don't roll over. When the organization has no other credits, Anthropic says, “API requests stop until your next monthly API credits arrive. Usage is never charged to your Claude plan.” To keep going sooner, buy credits in the Console.
- Your plan login expired. The Claude Code changelog for version 2.1.323 (November 12, 2026) lists this fix: “Fixed an expired claude.ai login showing "Credit balance too low" when a saved Console key or
ant auth loginprofile without credit was used instead”. Runclaude --versionto check your version. For an expired login, Anthropic's error reference says to run/loginand sign in again.
One developer has reported the third case. On November 7, 2026 they wrote on GitHub that interactive Claude Code failed on every prompt with a 400 and the first sentence of this message, while claude -p worked with the same key. Later that day they wrote that the cause, in their case, was a balance made up of a plan's monthly API credit.
The issue was opened on October 31, 2026 by another developer, with $199.61 showing in the Console. Their Claude Code answered every prompt with Credit balance too low · Add funds and the Billing link, while claude -p worked with the same key. When they sent the request themselves with curl, marked as interactive Claude Code, they got a 400 with the first sentence of this message. They haven't said whether the cause was the same.
Anthropic also sells two kinds of credits, in two places. Usage credits, bought under Settings → Usage on claude.ai, let a Pro, Max or Ultra plan keep working past its usage limits. The credits this error is about are bought on the Billing page of the Claude Console.
Sources: Claude Help Center, Why is Claude API usage billed separately from my paid Claude plan?, Can I have a Claude account and a Console account?, Manage API key environment variables in Claude Code, Monthly API credits for Max, Ultra, and Team plans, Manage usage credits for paid Claude plans; Claude Code, Authentication, Error reference; Anthropic, API credits for Max, Ultra, and Team plans
You just bought credits and still see it
Anthropic's billing article says: “Purchased credits are available immediately.” If the error stays, check these before you buy more. The same article says: “All credit purchases are non-refundable.”
- Is the key in the organization you paid for? The balance is per organization, and you can have more than one. API responses carry an
anthropic-organization-idheader with the ID of the organization the key belongs to. With curl,-iprints the headers. Compare that ID with the one on the Organization page of the Console where you bought the credits. - In Claude Code, which credential is active? Run
/status. If it shows an API key in use, unsetANTHROPIC_API_KEYas described above. If it shows a Console login you didn't mean to use, run/loginto switch to your plan. - Is the balance monthly API credit from a plan? It doesn't cover interactive Claude Code, as described above.
- Did you buy usage credits on claude.ai? Those extend a Claude plan. They aren't the Console credits this error is about.
- Still failing? Contact Anthropic support and include the
request_idfrom the error body. Anthropic asks for it when you report a specific request.
Developers have also reported cases where the credits were there and requests still failed. In a GitHub thread opened on April 29, 2026, they wrote that requests kept failing for a low credit balance for hours after a purchase. On May 1 one of them posted an email they said came from Anthropic. It said that for about a day, starting April 29, “some new API organizations were unable to make requests after purchasing credits”, and that the issue was fixed. Others wrote on May 2 that they were still blocked, and one wrote on May 27: “same, bought credits and unable to use”.
Sources: Claude Help Center, How do I pay for my Claude API usage?, Use Claude Code with your Pro, Max, or Ultra plan, Anthropic, API overview → Response headers, Errors → Request ID, Use WIF with GitHub Actions (it says where to find your organization ID), Claude Code, Authentication
Should your code retry?
No. Until someone adds credits, the same request gets the same answer. Claude Code's docs list an exhausted credit balance among the errors that won't clear until you fix them. Anthropic doesn't charge for failed requests, so the retries cost nothing there, but they don't get the work done either.
Anthropic's SDKs retry connection errors, rate limits and 5xx errors 2 times by default. They don't retry this one: in our test against a local server, the default client sent a 400 or a 402 once. What keeps sending the request is your own retry loop, queue or scheduled job. Check for a billing stop before you retry:
import anthropic
# How the message starts when prepaid credits have run out
LOW_BALANCE = "Your credit balance is too low"
def billing_stopped(error: Exception) -> bool:
"""True when Anthropic's response says billing stopped the request."""
if not isinstance(error, anthropic.APIStatusError):
return False
# What Anthropic's docs list for billing problems
if error.status_code == 402:
return True
body = error.body if isinstance(error.body, dict) else {}
info = body.get("error")
if not isinstance(info, dict):
return False
if info.get("type") == "billing_error":
return True
# What developers report: a 400 with this message
message = str(info.get("message", ""))
return error.status_code == 400 and message.startswith(LOW_BALANCE)import Anthropic from "@anthropic-ai/sdk";
// How the message starts when prepaid credits have run out
const LOW_BALANCE = "Your credit balance is too low";
type ErrorBody = { error?: { type?: unknown; message?: unknown } };
// True when Anthropic's response says billing stopped the request.
function billingStopped(error: unknown): boolean {
if (!(error instanceof Anthropic.APIError)) return false;
// What Anthropic's docs list for billing problems
if (error.status === 402) return true;
const info = (error.error as ErrorBody | undefined)?.error;
if (info?.type === "billing_error") return true;
// What developers report: a 400 with this message
const message = typeof info?.message === "string" ? info.message : "";
return error.status === 400 && message.startsWith(LOW_BALANCE);
}When the check says yes, stop and tell someone who can add credits.
- The 400 check reads the message. Anthropic says not to match on message wording, because it can change. But the contributor quoted above says the message text is the only thing that sets this 400 apart, so treat the check as best effort.
- The Python and TypeScript SDKs have no error class for it. In our test, the 400 arrived as
BadRequestError, like any malformed request, and the 402 as the SDK's general status error. TheBillingErrorin the comment quoted above is, in the current SDKs (anthropic 2.8.0, @anthropic-ai/sdk 1.8.0), the type of the error body, not an error your code can catch. - Spend limits need their own checks. The SDKs do retry the 429 from your tier's spend cap. The spending limit guide has the checks for that.
We ran the checks with the Python SDK (anthropic 2.8.0 and 0.60.0) and the TypeScript SDK (@anthropic-ai/sdk 1.8.0 and 0.60.0), against a local test server that sends the 400 shown above, a 402 billing_error, and the spend limit errors from the other guide.
Sources: Claude Help Center, How do I pay for my Claude API usage?, Anthropic, Errors, Claude Code, Keep Claude working toward a goal, anthropic-sdk-python, anthropic-sdk-typescript
How prepaid credits and auto-reload work
- Buying. Log in to the Console with an Admin or Billing role, open the Billing page and click Buy credits. Purchased credits cover the API, the playground and Claude Code.
- Expiry. Purchased credits expire one year from the purchase date, and Anthropic says the date can't be extended. Expired credits are listed under Invoice history on the Billing page.
- Auto-reload buys more credits when your balance falls below a threshold you set. On the Billing page, in the Credit balance section, click Set up auto-reload. Enter the balance that triggers a purchase and the balance to reload to. If your balance is already at or below the threshold, you're charged right away.
- Auto-reload with monthly API credits. Monthly credits are spent first. Auto-reload looks only at your purchased balance, so it can buy credits while monthly credits remain.
- Invoices instead of credits. Organizations with an invoicing arrangement are billed monthly and don't prepay.
- What the docs don't say. Anthropic's billing article doesn't say what happens when an auto-reload charge fails.
Auto-reload swaps one risk for another. Without it, an empty balance stops your app. With it, running out of credits may no longer stop a runaway loop, because Anthropic buys more. Anthropic's Claude Code docs suggest using it together with a limit: turn on auto-reload “so the balance refills before it hits zero”, and set per-workspace spend caps “to prevent a single project from draining the org balance”.
Sources: Claude Help Center, How do I pay for my Claude API usage?, Anthropic, API credits for Max, Ultra, and Team plans, Claude Code, Error reference
How this differs from a spend limit
Running out of credits and reaching a spend limit both stop your requests. They are different stops with different fixes.
- Credit balance too low: the credits you prepaid are used up. Developers report a 400 with the type
invalid_request_errorand the message at the top of this page. Requests work again when the organization has credits. - A spend limit you set: also a 400 with the type
invalid_request_error, but the message starts with “You have reached your specified API usage limits”, or “You have reached your specified workspace API usage limits”, and says when access comes back. - Your tier's monthly spend cap: a 429 with the type
rate_limit_error. On the Messages API, itsdetails.error_codeisenforced_spend_limit_reached.
One doesn't replace the other. Anthropic says this of the monthly credits that come with a plan: usage paid with them counts toward your organization's monthly spend cap. The cap is the most your organization can spend on the API in a calendar month. So you can reach a limit with credits left. And when the credits are gone, requests stop even if you are far below your limit.
How to set a spending limit on the Anthropic API covers those two errors, where to set the limits, and code that stops retrying them.
Sources: Anthropic, Rate limits → Spend limits, API credits for Max, Ultra, and Team plans
Where Billfuse fits
Billfuse is the tool we built to watch AI API spend. It would not have warned you about this error. It reads what your Console organization has spent, not its prepaid credit balance, so it can't tell you the balance is about to run out. And it doesn't see usage on a Claude plan such as Pro or Max at all.
It can help with a different problem. With auto-reload on, running out of credits may no longer stop your spend. For that:
- Budget alerts. Billfuse connects with an Anthropic admin key, checks your spend every hour and emails you at 50%, 80% and 100% of a monthly budget you set. It can post to Slack too. Individual accounts get admin keys once they set up an organization in the Claude Console. The budget counts this calendar month's spend. It isn't a count of the credits you have left.
- Spike alerts, with no budget needed. When one provider's day reaches 3 times a normal day, and at least $10 more, you get an email, and a Slack message if you added one.
- Pausing, if you turn it on. It's off by default. When your total budget or your Anthropic budget reaches 100%, Billfuse switches off each active Anthropic API key. It doesn't turn them back on until you click Resume. It isn't instant: Billfuse checks your spend once an hour.
- What it can't do. It doesn't read a credit balance at any provider. It can pause only OpenAI and Anthropic. Gemini and OpenRouter can't be paused, and their spend reaches Billfuse about a day late. Keep Anthropic's own spend limits on.
More guides
- How to put a hard spending cap on OpenAI, Anthropic, Gemini and OpenRouter
- How to set a hard spending limit on the OpenAI API
- How to set a spending limit on the Anthropic API
- How to set a spending limit on the Gemini API
- How to set a spending limit on the OpenRouter API
- Billing error or rate limit? AI API errors from OpenAI, Anthropic, Gemini and OpenRouter
- Leaked AI API key: what to do first
- Gemini API error 402: "Your prepayment credits are depleted"
- OpenAI error 429 insufficient_quota: "You exceeded your current quota"
- OpenRouter 402: "This request requires more credits, or fewer max_tokens"
It's free while Billfuse is in early access. You can try it with sample data first, no sign-up needed.