Skip to navigation

Errors

Errors from /v1/chat/completions and /v1/models come back in the OpenAI error envelope, so error handling written for the OpenAI SDK works unchanged.

{
"error": {
"message": "body.messages: Field required",
"type": "invalid_request_error",
"code": "invalid_request",
"param": null
}
}
FieldTypeDescription
messagestringHuman-readable explanation
typestringError category, such as invalid_request_error, authentication_error or rate_limit_error
codestring or nullMachine-readable error code, when there is one
paramstring or nullThe request parameter that caused the error, when there is one

Status codes

StatusMeaningWhat to do
400The request body is invalidFix the request and retry
401Missing or revoked API keyCheck the Authorization header
404Unknown model IDUse an ID from GET /v1/models. IDs have no namespace prefix, so reka/glm5.3 is a 404
429Rate or capacity limitRetry with backoff
5xxServer errorRetry with backoff. If it persists, contact contact@reka.ai with the request ID

Request ID

Every response includes an X-Request-ID header:

X-Request-ID: 5f6ee7458b7d4abcbad3bde91da53ea7

Include this ID when you report an issue.

The Vision API uses a different error shape, documented in Vision API errors.