auth

invalid_api_key error: cause & fix

Invalid API key or authentication failed

invalid_api_keyincorrect api keyauthentication_errorunauthorized401

Likely cause

The key may be wrong, expired, missing permission, or not accepted by this endpoint.

Recommended fixes

  1. Check whether the key was copied completely
  2. Confirm the API base URL and key belong to the same provider
  3. Use the key checker to validate the /models endpoint

Related tools