Anthropic Claude API error
Anthropic API 401 authentication_error: what it means and how to fix it
401 authentication_errorRetry? Not statedLast verified 1 documented fix1 source
What it means
There is an issue with your API key, for example it is malformed, revoked, or expired. On Claude Platform on AWS, this can also indicate a problem with your AWS credentials or SigV4 signature.
Causes
- API key is malformed
- API key is revoked
- API key is expired
- On Claude Platform on AWS: invalid AWS credentials or SigV4 signature
How to fix it
- Fix 1.
Check that you are sending a valid, unexpired API key (see Key expiration in the authentication docs).
Seen in coding agents
These coding agent messages pass this Anthropic API error through. Each page has the agent-specific fix.
More Anthropic API errors
All 13 Anthropic API errors400 invalid_request_errorRetry? Not stated400 invalid_request_error (spend limit reached)Retry? Not stated402 billing_errorRetry? Not stated403 permission_errorRetry? Not stated404 not_found_errorRetry? Not stated409 conflict_errorRetry? Yes413 request_too_largeRetry? Not stated429 rate_limit_errorRetry? Yes
HTTP 401 at other providers
Compare 401 across providers401 UnauthorizedRetry? Not statedAzure OpenAI401 UnauthorizedRetry? Not statedCohere API401 - Authentication FailsRetry? Not statedDeepSeek API401 authenticationRetry? NoGemini API401 UnauthorizedRetry? Not statedGroq API401 UnauthorizedRetry? Not statedMistral API401 Invalid AuthenticationRetry? Not statedOpenAI API401 Incorrect API key providedRetry? Not statedOpenAI API401 You must be a member of an organization to use the APIRetry? Not statedOpenAI API401 IP not authorizedRetry? Not statedOpenAI API401 authenticationRetry? Not statedOpenRouter401 UNAUTHENTICATEDRetry? NoVertex AI
FAQ
What does the Anthropic API error "401 authentication_error" mean?
There is an issue with your API key, for example it is malformed, revoked, or expired. On Claude Platform on AWS, this can also indicate a problem with your AWS credentials or SigV4 signature.
How do I fix Anthropic API "401 authentication_error"?
Check that you are sending a valid, unexpired API key (see Key expiration in the authentication docs).
Should I retry Anthropic API "401 authentication_error"?
Not stated. The official docs do not say whether this error is retryable.
Which other AI APIs return HTTP 401?
Per their official error docs: Azure OpenAI (401 Unauthorized), Cohere API (401 Unauthorized), DeepSeek API (401 - Authentication Fails), Gemini API (401 authentication), Groq API (401 Unauthorized), Mistral API (401 Unauthorized), OpenAI API (401 Invalid Authentication; 401 Incorrect API key provided; 401 You must be a member of an organization to use the API; 401 IP not authorized), OpenRouter (401 authentication), Vertex AI (401 UNAUTHENTICATED), xAI API (401 Unauthorized).
Sources
Last verified against 1 source: Anthropic API's official docs and official SDK repositories.
- platform.claude.comhttps://platform.claude.com/docs/en/api/errors
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.