2xx range indicate success. Codes in the 4xx range indicate an error from the provided information (e.g., missing required parameter, unauthorized access). Codes in the 5xx range indicate an error with deAPI servers.
HTTP Status Codes
| Code | Status | Description |
|---|---|---|
200 | OK | Request succeeded. Response contains requested data. |
401 | Unauthorized | Invalid or missing API key. |
404 | Not Found | The requested resource (job, model) does not exist. |
422 | Unprocessable Entity | Request validation failed. Check the errors array for details. |
429 | Too Many Request | Rate limit exceeded. |
500 | Internal Server Error | Something went wrong on our end. Try again later. |
Error Response Format
All error responses follow a consistent JSON structure:Always
null for error responses.Human-readable error description.
Additional error details. For validation errors (422), contains field-specific messages.
HTTP status code (matches the response status).
Error Types
401 Unauthorized
Returned when authentication fails. Common causes:- Missing
Authorizationheader - Invalid API key
- Expired API key
Authorization: Bearer <API_KEY> header.
404 Not Found
Returned when the requested resource doesn’t exist. Common causes:- Invalid
request_idwhen polling results - Model name doesn’t exist
- Request ID not found
request_id, model name) is correct. Use the Model Selection endpoint to get valid model names.
422 Unprocessable Entity
Returned when request validation fails. Theerrors array contains field-specific details.
Common causes:
- Missing required parameters
- Invalid parameter values (out of range, wrong type)
- Invalid image/video URL or format
errors array to identify which fields failed validation and correct them according to the API documentation.
500 Internal Server Error
Returned when an unexpected error occurs on our servers.Best Practices
Handle all error codes
Implement error handling for all possible status codes in your application.
Parse the errors array
For 422 responses, iterate through the
errors array to display field-specific messages to users.Implement retry logic
For 500 errors, implement exponential backoff retry (e.g., 1s, 2s, 4s delays).
Log error responses
Log full error responses for debugging. Include
request_id if available.