freeaiapi.ai

Errors

Error format and common status codes.

Errors use the OpenAI-style JSON shape:

{
  "error": {
    "message": "Invalid token (request id: ...)",
    "type": "new_api_error",
    "code": ""
  }
}

Include the request ID from the message when contacting support.

StatusMeaningWhat to do
401Missing or invalid API keyCheck the Authorization header and that the key is enabled.
403Balance used up (insufficient_user_quota) or key limit reachedTop up in the console or raise the key's limit.
429Rate limitedRetry with exponential backoff.
5xxUpstream or gateway errorRetry; if it persists, try another model or contact support.