Skip to content
WRAITHERIXDocsENRU

Errors

Errors use the OpenAI error format on every endpoint:

{
"error": {
"message": "Human-readable description (request id: 2026110818…)",
"type": "api_error",
"param": "",
"code": "model_not_found"
}
}

Every response carries an X-Request-Id header, and error messages include the request id. Quote it when contacting support.

Status Meaning What to do
400 Invalid request: malformed JSON, unknown parameter, bad image URL. Fix the request. Do not retry.
400 content_policy_violation The generation prompt asks for adult or sexual (NSFW) content, which is not allowed (Terms §6A). The request is not charged. Change the prompt. Do not retry.
401 Missing or invalid API key. Check the key and the auth header.
403 insufficient_user_quota Not enough credits, or the key reached its own credit limit. Top up, or raise the key’s limit.
403 Key not allowed for this model or IP. Check the key’s model / IP allow-lists.
404 Unknown endpoint. Check the URL and the base URL (/v1).
429 Rate limit exceeded. Retry with exponential backoff.
500 Internal error. Retry; contact support if it persists.
503 model_not_found Model does not exist, is not enabled for your account, or is temporarily unavailable. Check the model ID in the catalogue; retry later.
504 The model took too long to respond. Retry; reduce max_tokens or use streaming.

Retry 429, 500, 502, 503 and 504 with exponential backoff and jitter. The official OpenAI and Anthropic SDKs already retry these automatically (2 retries by default):

client = OpenAI(base_url="https://api.wraitherix.com/v1",
api_key=os.environ["WRAITHERIX_API_KEY"],
max_retries=4, timeout=120)

Never retry 400, 401 or 403 without changing the request.