Logo SVG copied to clipboard
New Introducing paid plans for Manifest Cloud Learn more

OpenAI 401 — Invalid authentication

What this error means

OpenAI returns 401 when the API key is missing, malformed, revoked, or scoped to the wrong org or project.

How to fix it

  • Confirm the Authorization: Bearer header carries a current key
  • Rotate the key if it may be leaked or revoked
  • Check the org and project the key is scoped to
Example error message
{
  "error": {
    "message": "Your authentication token has been invalidated. Please try signing in again.",
    "type": "invalid_request_error",
    "code": "invalid_authentication"
  }
}

Also seen as

The same underlying error surfaces with these messages across providers and SDKs:

Incorrect API key provided.

Frequently asked

Why did a working key suddenly 401?

Keys 401 the moment they are rotated or revoked, or if the project they belong to is deleted.

More OpenAI errors

CodeErrorAffected teams / 30 days
429 OpenAI 429 — Rate limit exceeded 68 View
400 OpenAI 400 — Context length exceeded 34 View
View all OpenAI errors
Route OpenAI through Manifest Live token usage, every model, and automatic fallback when OpenAI rate-limits or fails.

Don't let your requests fail again and again

Manifest fixes your bad LLM requests on the fly so they return successful responses before it reaches your agent. No downtime.

  • Deprecated / Not-found models
  • Wrong parameters
  • Malformed requests
  • Exceeded context windows