Query the task result
Polling strategy
- Call Create an image-to-video task to get a
task_id. - Poll this endpoint every 5 seconds until
task_statusisSUCCEEDEDorFAILED. Generation takes 1 to 5 minutes. - On success, download the video from
output.video_url.
Notes
- URL expiration: The video URL expires after 24 hours. Download the video promptly.
- Task ID expiration: A
task_idis valid for 24 hours. After that, the status is returned asUNKNOWN. - Task status flow:
PENDING→RUNNING→SUCCEEDEDorFAILED.CANCELEDmeans the task was canceled. - Avoid duplicate submissions: Poll for the result instead of submitting the task again.
- Billing: Charged per second of output video.
durationandresolutiondirectly affect the cost.
Output
| Field | Description |
|---|---|
output.video_url | Download URL of the generated MP4 video. Valid for 24 hours. |
usage.duration | Billable video duration in seconds. |
usage.output_video_duration | Actual duration of the generated video. |
usage.size | Output resolution in width*height format. |
usage.fps | Frame rate of the generated video. |
Authorizations
string
header
required
QwenCloud API key. See Get an API key.
Path Parameters
string
required
The task ID returned by the create operation. It is valid for queries for 24 hours.