Skip to content

Errors ​

LLMAPI returns HTTP status codes and structured error information where possible. Different protocols keep their corresponding error shapes, so there is not only one JSON error format.

Common Error Shapes ​

Anthropic/OpenAI compatible endpoints often return:

json
{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "Request body is empty"
  }
}

OpenAI image endpoints often return:

json
{
  "error": {
    "type": "not_found_error",
    "message": "Images API is not supported for this platform"
  }
}

Common HTTP Status Codes ​

StatusMeaningCommon causes
400Invalid requestInvalid JSON, wrong parameter type, or platform group mismatch.
401Authentication failedMissing or invalid API key.
403Permission deniedInsufficient balance, wrong key type, image generation disabled, or content moderation blocked.
404Endpoint or capability unavailableNon-OpenAI group calling OpenAI synchronous image endpoints, or OpenAI group calling token count.
413Request body too largeRequest exceeds the configured body limit.
429Rate limitedToo many concurrent requests.
500Server errorUnexpected server error.
502Provider errorThe model provider returned an error.
503Service unavailableNo available accounts or a required service is unavailable.
504TimeoutThe request timed out.

Platform Restriction Errors ​

Non-OpenAI group calling an OpenAI synchronous image endpoint:

json
{
  "error": {
    "type": "not_found_error",
    "message": "Images API is not supported for this platform"
  }
}

OpenAI group calling token count:

json
{
  "type": "error",
  "error": {
    "type": "not_found_error",
    "message": "Token counting is not supported for this platform"
  }
}

Retry Guidance ​

Error typeRecommendation
400, 401, 403, 404Do not retry unchanged; fix request, authentication, group, or permission first.
413Reduce request body or uploaded resource size.
429Retry with exponential backoff and reduce concurrency.
500, 502, 503, 504Retry with exponential backoff.