Appearance
Error codes
Errors are returned using the standard response envelope with an error status code and message.
| HTTP | status code | Description |
|---|---|---|
| 400 | BAD_REQUEST_ERROR | The request was malformed. |
| 401 | UNAUTHORIZED_ERROR | Missing or invalid API token. |
| 402 | PAYMENT_REQUIRED_ERROR | Not enough tokens/credits to process the request or need to upgrade to a premium plan. |
| 404 | NOT_FOUND_ERROR | The requested resource was not found. |
| 410 | GONE_ERROR | The resource is no longer available. |
| 422 | VALIDATION_ERROR | Input failed validation; see data for details if any. |
| 429 | TOO_MANY_REQUESTS_ERROR | Rate limit exceeded. Use Retry-After before retrying. |
| 500 | SERVER_ERROR | Internal server error. |
| 504 | GATEWAY_TIMEOUT_ERROR | The operation did not finish within the time window. |
Example error response:
json
{
"status": "VALIDATION_ERROR",
"message": "Invalid promptVersionId",
"data": ...
}Used by:
- Runs: Create a run, Retrieve a run