Orq.ai uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided. Codes in the 5xx range indicate an error with Orq or the LLM provider servers.

Attributes

id string

The id of the transaction is useful for reporting metrics in the logs. If the transaction code is 4xx, any attempts to report metrics will result in an error.

code number

For specific errors that can be handled programmatically, an error code is provided. Refer to the table below for a summary of these codes.

error message

A human-readable message providing more details about the error.

source string

The source of the error that was generated. If the source is provider, it means the error was thrown in the model provider layer; if it's system, it indicates that the error was thrown in the Orq gateway layer.

HTTP Status code summary

StatusSummaryMeaning
200OKEverything worked as expected
400Bad RequestThe request was unacceptable, often due to missing a required parameter
401UnauthorizedNo valid API key provided
402Request FailedThe parameters were valid but the request failed
403ForbiddenThe API key doesn’t have permissions to perform the request
404Not FoundThe requested resource doesn’t exist
409ConflictThe request conflicts with another request
429Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests
500, 502, 503, 504Server ErrorsSomething went wrong on Orq’s gateway or model provider end. (These are rare.)

Error example

{
    "id": "efe8c8461327459eb1c26e532edb386a",
    "code": 404,
    "error": "Deployment with key 'example' was not found.",
    "source": "system"
}