Skip to main content

Error Response Format

When a task fails (status: "failed"), the response includes an error object:

Error Codes Overview

Client Errors (Fixable by User)


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:
Common Triggers:
How to avoid:
  • Avoid uploading real photos of people — use illustration or cartoon styles instead
  • Remove brand logos, trademarks, and copyrighted IP characters
  • Avoid adult, violent, or self-harm themes
  • Use generic character descriptions (e.g., “a person”) instead of referencing specific celebrities

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.
Common Causes:
  • 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.)
How to fix:
  • Adjust your prompt to be more clear and specific
  • Use different reference images — avoid images with watermarks or logos
  • Simplify the request (lower resolution or complexity)
  • Simply retry — some cases succeed on retry

invalid_parameters

Invalid Parameters

Request parameters do not meet model requirements.
Common Sub-types:
How to fix:
  • Check the model-specific API documentation for parameter requirements
  • Supported image formats: JPG, PNG, WebP, GIF (HEIC, AVIF, TIFF are not supported)
  • Image size limits: typically < 10MB, some models < 30MB
  • Shorten your prompt or split long prompts into core descriptions

image_processing_error

Image Processing Failed

The system could not process the input image.
Common Causes:
  • 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
How to fix:
  • Ensure the image URL is publicly accessible with no authentication or region restrictions
  • Use standard formats: JPG, PNG, WebP
  • Try using the File Upload API instead of URLs
  • Verify the image opens correctly in a browser

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.
Example:
  • aspect_ratio=1280x720 (16:9) requires a 1280x720 landscape image
  • aspect_ratio=720x1280 (9:16) requires a 720x1280 portrait image
How to fix: Resize your image to match the requested aspect_ratio parameter, or change the aspect_ratio to match your 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.
Common Causes:
  • Upstream model service temporarily unavailable
  • Server overload / high traffic
  • Maintenance in progress
  • Network connection interrupted
How to fix:
  • Wait 30-60 seconds and retry — the system usually recovers automatically
  • If persistent, contact technical support
  • No need to modify your request — retry the same request

generation_timeout

Generation Timeout

The task did not complete within the allowed time.
Common Causes:
  • High system load causing queue delays
  • High task complexity (high resolution, long video, etc.)
  • Slow upstream service response
How to fix:
  • Retry later, preferably during off-peak hours
  • Reduce task complexity: lower resolution, shorter video duration
  • Simplify prompt descriptions

quota_exceeded

Quota / Rate Limit Exceeded

Request frequency or concurrency limits have been exceeded.
Common Causes:
  • Too many requests sent in a short period (rate limiting)
  • Multiple tasks processing simultaneously (concurrency limit)
  • Account quota depleted
How to fix:
  • Reduce request frequency — recommended 1-2 second interval between requests
  • Wait for in-progress tasks to complete before submitting new ones
  • If quota is depleted, visit the billing page to recharge

resource_exhausted

Resource Exhausted

Upstream service compute resources are temporarily depleted. Usually occurs during peak model usage periods.
How to fix:
  • Wait 1-5 minutes for automatic recovery
  • The system automatically switches between multiple routes — retrying later usually succeeds

resource_not_found

Resource Not Found

The requested task ID does not exist or has expired.
How to fix:
  • Verify the task ID is correctly spelled
  • Task results have an expiration period — expired tasks cannot be queried
  • If the ID is correct, retry after a short wait

request_cancelled

Request Cancelled

The task was cancelled or interrupted during processing.
If you did not intentionally cancel, simply resubmit the same request.

service_unavailable

Service Unavailable

An internal authentication or connection issue occurred. This error has been automatically logged and will typically be resolved quickly.
How to fix:
  • Wait a few minutes and retry
  • If persistent, contact technical support with your task ID

unknown_error

Unknown Error

An unclassified error. The system could not identify the specific error type.
How to fix:
  • Retry after a short wait
  • If the issue persists, contact technical support with the full task ID

Best Practices

Error Handling Example

Retryable vs Non-Retryable

Fix Request Before Retry

  • content_policy_violation — Modify content
  • invalid_parameters — Fix parameters
  • image_processing_error — Use different image
  • image_dimension_mismatch — Resize image

Safe to Retry Directly

  • generation_failed_no_content — Try different prompt
  • service_error — Wait, then retry
  • generation_timeout — Wait, then retry
  • resource_exhausted — Auto-recovers
  • quota_exceeded — Reduce frequency, then retry