Error Handling

Qorebit uses standard HTTP response codes to indicate the success or failure of an API request.

Error Format

All error responses follow this JSON structure:

JSON Error
{
  "error": {
    "message": "The model 'invalid-model' does not exist.",
    "type": "invalid_request_error",
    "param": "model",
    "code": "model_not_found"
  }
}

HTTP Status Codes

CodeDescription
200OK - Everything worked as expected.
400Bad Request - Your request has invalid parameters.
401Unauthorized - No valid API key provided.
403Forbidden - Access to the requested resource is forbidden.
404Not Found - The requested resource doesn't exist.
429Too Many Requests - You have hit your rate limit or credit limit.
500Internal Server Error - Something went wrong on our end.

Common Error Codes

insufficient_credits

Your workspace does not have enough credits to complete the request. Please top up in the dashboard.

rate_limit_exceeded

You have exceeded the rate limit for this model and tier. Please wait or upgrade.

model_overloaded

The upstream provider is currently overloaded. Qorebit will automatically attempt a retry if you have failover models configured.

invalid_api_key

The API key provided is invalid, expired, or deactivated.