Skip to main content
When a request fails, the Qai Platform API returns a non-2xx HTTP status and a JSON body describing the problem, in the same format as the OpenAI API.

Error format

  • type is the broad category.
  • code names the specific problem where there is one, otherwise it is null.
  • message is a human-readable description. Do not parse it; branch on type and code.

Common errors

Retrying

Retry 5xx responses with exponential backoff. Do not retry 400 or 401 unchanged: they fail the same way until the request or key is fixed. A 429 with budget_exceeded succeeds again only after credit is added.