Error Response Format
When a task fails (status: "failed"), the response includes an error object:
| Field | Type | Description |
|---|---|---|
error.code | string | Error code identifier. See the full list below |
error.message | string | User-friendly error description with troubleshooting tips |
Error Codes Overview
Client Errors (Fixable by User)
Client Errors (Fixable by User)
| Error Code | Description | Retryable |
|---|---|---|
content_policy_violation | Content violates safety policies | Fix content, then retry |
invalid_parameters | Invalid request parameters | Fix params, then retry |
image_processing_error | Image processing failed | Use different image |
image_dimension_mismatch | Image dimensions don’t match request | Resize image, then retry |
request_cancelled | Request was cancelled | Resubmit |
Server Errors (Retry Later)
Server Errors (Retry Later)
| Error Code | Description | Retryable |
|---|---|---|
generation_failed_no_content | Model failed to generate output | Try different prompt |
service_error | Internal service error | Auto-recovers, retry later |
generation_timeout | Task processing timed out | Retry later |
resource_exhausted | Upstream resources temporarily depleted | Auto-recovers, retry later |
quota_exceeded | Rate limit or quota exceeded | Reduce frequency, retry later |
service_unavailable | Service temporarily unavailable | Auto-recovers, retry later |
resource_not_found | Task ID invalid or expired | Check task ID |
unknown_error | Unclassified error | Contact support |
Error Code Details
content_policy_violation
Content Policy Violation
Your request was blocked by safety filters. This is the most common error type, covering the following scenarios:
| Sub-type | Description | Example Message |
|---|---|---|
| Photorealistic people | Uploaded image contains real human faces | photorealistic people detected |
| Celebrity likeness | Involves celebrities or public figures | celebrity detected in image |
| Copyright/Trademark | Involves brand logos, trademarks, or copyrighted IP | third-party content violation |
| Adult/NSFW | Contains nudity or sexually suggestive content | nudity detected |
| Violence/Self-harm | Contains violent, graphic, or self-harm content | violence content blocked |
| Minor protection | Involves sensitive content related to minors | minor content not allowed |
| General policy | Other content policy violations | content policy violation |
generation_failed_no_content
Generation Failed
The model was unable to produce output for your request. While the request format was valid, the model could not generate a result during processing.
- Poor prompt quality: Description is too vague or contradictory for the model to understand
- Model capability limits: The prompt exceeds the model’s generation capabilities
- Upstream service issues: The underlying model service returned an empty result
- Protected content detection: The prompt or reference image may involve watermark removal or protected content (logos, trademarks, etc.)
invalid_parameters
Invalid Parameters
Request parameters do not meet model requirements.
| Sub-type | Description | Example |
|---|---|---|
| Prompt too long | Prompt exceeds model’s maximum length | Prompt is too long |
| Image dimension | Image width/height or aspect ratio out of range | image dimensions must be between 240 and 7680 |
| File too large | Uploaded file exceeds size limit | file size exceeds 10MB |
| Unsupported format | Uploaded file format is not supported | unsupported file type |
| Video duration | Video duration outside model’s supported range | Video duration must be between 1-30 seconds |
image_processing_error
Image Processing Failed
The system could not process the input image.
- Image URL is inaccessible (authentication required, CDN restrictions, expired link)
- Image format is not supported (e.g., HEIC, AVIF)
- Image file is corrupted
- Network issues prevented image download
image_dimension_mismatch
Image Dimension Mismatch
The input image dimensions do not match the dimensions specified in the request. Common in image-to-video scenarios.
aspect_ratio=1280x720(16:9) requires a 1280x720 landscape imageaspect_ratio=720x1280(9:16) requires a 720x1280 portrait image
service_error
Service Error
An internal issue occurred in the upstream service. This is usually temporary — the system automatically switches to other available routes.
- Upstream model service temporarily unavailable
- Server overload / high traffic
- Maintenance in progress
- Network connection interrupted
generation_timeout
Generation Timeout
The task did not complete within the allowed time.
- High system load causing queue delays
- High task complexity (high resolution, long video, etc.)
- Slow upstream service response
quota_exceeded
Quota / Rate Limit Exceeded
Request frequency or concurrency limits have been exceeded.
- Too many requests sent in a short period (rate limiting)
- Multiple tasks processing simultaneously (concurrency limit)
- Account quota depleted
resource_exhausted
Resource Exhausted
Upstream service compute resources are temporarily depleted. Usually occurs during peak model usage periods.
resource_not_found
Resource Not Found
The requested task ID does not exist or has expired.
request_cancelled
Request Cancelled
The task was cancelled or interrupted during processing.
service_unavailable
Service Unavailable
An internal authentication or connection issue occurred. This error has been automatically logged and will typically be resolved quickly.
unknown_error
Unknown Error
An unclassified error. The system could not identify the specific error type.
Best Practices
Error Handling Example
Retryable vs Non-Retryable
Fix Request Before Retry
content_policy_violation— Modify contentinvalid_parameters— Fix parametersimage_processing_error— Use different imageimage_dimension_mismatch— Resize image
Safe to Retry Directly
generation_failed_no_content— Try different promptservice_error— Wait, then retrygeneration_timeout— Wait, then retryresource_exhausted— Auto-recoversquota_exceeded— Reduce frequency, then retry