Error Codes
This document describes the error codes returned in API responses.
Response Format
When a task fails, the response includes error information:
{
"id": "prediction-uuid",
"status": "failed",
"code": 1401,
"error": "Error description",
...
}| Field | Description |
|---|---|
code | Error code. 0 indicates success. |
error | Error message. Empty on success. |
Success
| Code | Description |
|---|---|
| 0 | Success |
Client Errors (1xxx)
| Code | Name | Description | Suggested Action |
|---|---|---|---|
| 1200 | Content Moderation | The content contains sensitive information. | Modify the input content and retry. |
| 1400 | Missing Parameter | A required parameter is missing. | Check the API documentation for required parameters. |
| 1401 | Invalid Parameter | The parameter value is invalid. | Verify parameter format and value constraints. |
| 1402 | Media Access Failed | Unable to access the provided media URL. | Ensure the URL is publicly accessible and valid. |
| 1403 | Task Execution Failed | The task could not be completed. | Check the error message and adjust input parameters. |
| 1405 | Task Failed | The task execution failed. | Check the error message for details. |
Server Errors (5xxx)
| Code | Name | Description | Suggested Action |
|---|---|---|---|
| 5000 | Internal Error | An internal error occurred. | Please try again later. |
| 5003 | Service Unavailable | The service is temporarily unavailable. | Please try again later. |
| 5004 | Timeout | The request timed out. | Reduce input size or complexity and retry. |
Best Practices
- 1xxx errors: Review and correct your request parameters.
- 5xxx errors: Retry with exponential backoff.
Example
{
"id": "abc123",
"model": "model-name",
"status": "failed",
"code": 1402,
"error": "Failed to download image from the provided URL.",
"outputs": []
}