AUTH / ERROR-CATALOG-v1

invalid_api_keycauses and resolution

Invalid API key or authentication failure

  • invalid_api_key
  • authentication_error
  • incorrect_api_key
  • invalid x-api-key

What this signal means

The server did not accept the credential attached to this request.

Typical HTTP
401
Protocols
openai / anthropic
Catalog date
2026-09-08

Sanitized response example

{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key was not accepted"
  }
}

Possible causes

  • The key, whitespace, header name, or Bearer format is incorrect.
  • The key was revoked, expired, or belongs to another project, gateway, or environment.

Verification and resolution order

  1. 01

    Confirm that the target host matches the platform that issued the key.

  2. 02

    Rebuild the authentication header and never place the key in a URL.

  3. 03

    Check key status with the issuer; revoke the old credential after rotation.

What this error cannot prove

A 401 result says nothing about balance, model access, or relay routing.

Official references