Claude API 401 authentication_error
The Claude API returns 401 authentication_error? Anthropic says there is an issue with your API key, for example it is malformed, revoked, or expired.
Reviewed October 24, 2026
What it means in plain English
Anthropic's Claude API errors page lists 401 - authentication_error: there's an issue with your API key, for example it's malformed, revoked, or expired. On Claude Platform on AWS, the same error can also indicate a problem with your AWS credentials or SigV4 signature.
The API returns errors as JSON with a top-level error object that always has a type and a message. The response also has a request_id. For this error, type is authentication_error.
Other codes on the same page mean different things. 402 - billing_error is an issue with billing or payment information. 403 - permission_error means the key does not have permission to use the resource. 429 - rate_limit_error and 529 - overloaded_error are rate and load errors.
Likely causes
- The API key is malformed.
- The API key was revoked.
- The API key expired.
- On Claude Platform on AWS, the AWS credentials or SigV4 signature are the problem.
How to fix it, step by step
- Read
error.typein the response, or the typed exception your SDK raised. Anthropic says to catch the SDK's typed classes rather than string-matching error messages. Stay on this page when the type isauthentication_error. - Check the key value your server sends. A malformed key is one of the causes Anthropic names.
- If the key was revoked or expired, use a key that is still valid. Anthropic's errors page links to its Key expiration section for expiry.
- On Claude Platform on AWS, check the AWS credentials and the SigV4 signature.
- If the type is
permission_error(403) instead, check your organization's access and workspace settings in the Claude Console. If it isbilling_error(402), check payment details in the Claude Console. - If you contact support, include the
request_idfrom the error body or therequest-idheader.
How to check it worked
- The same request no longer returns
401withauthentication_error. - A 429 or 529 after that is a rate or load error. See Claude or Gemini 429 and overloaded.
Sources
Related fixes
More AI API errors fixes
Keep going on your own.
The guides stay free. A deep leak report is $15. Fix packs are $24, or $49 for all three. There is no done-for-you repair.