Skip to main content
Suiri uses standard HTTP status codes to indicate the success or failure of API requests. When an error occurs, the API returns a structured JSON response describing the issue. Suiri’s API is 4-compatible, and error responses follow common OpenAI conventions.

HTTP Status Codes

Status CodeMeaningDescription
200OKThe request completed successfully
400Bad RequestInvalid or malformed request payload
401UnauthorizedAPI key is missing, invalid, or revoked
402Payment RequiredAn active billing method is required to run inference
404Not FoundThe requested endpoint does not exist
429Too Many RequestsRate limit or usage limit exceeded
500Internal Server ErrorAn unexpected server-side error occurred
503Service UnavailableThe requested model or capacity is temporarily unavailable

Error Response Format

When a request fails, the API returns a JSON response containing an error object. Example:
{ 
  "error": { 
    "message": "Invalid API key", 
    "type": "authentication_error", 
    "code": "invalid_api_key", 
    "param": null 
  } 
}