GuideVideo GenerationWan
Query Task Status
Query Wan video task status by task_id: poll progress and state, retrieve video_url on success, with response fields, cURL example, and polling tips.
(Wan Video Status)
Use the task_id obtained when submitting the generation task to query the progress, status, and final result link of a Wan video generation task in real time.
📌 Basics
- Endpoint:
GET /v1/video/generations/{task_id} - Authentication:
Bearer Token(Authorization: Bearer sk-xxxxxx) - Content type:
application/json
📥 Request Parameters (Path)
| Parameter | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | Unique identifier of the video generation task. |
📤 Response
Status code: 200 OK
| Field | Type | Description |
|---|---|---|
| id | string | Task ID. |
| task_id | string | Task ID (same as above). |
| status | string | Task status: queued, processing, success, failed. |
| progress | integer | Task generation progress (0-100). |
| video_url | string | Video download link (only returned when status is success). |
| fail_reason | string | Failure reason (only returned when status is failed). |
| created_at | integer | Unix timestamp when the task was created. |
📝 Request Example (cURL)
curl -X GET "http://192.168.5.29:4000/v1/video/generations/task_xGOhEWZIx3qiVkqL7rCE0np45eaTM2HA" \
-H "Authorization: Bearer $YOUR_API_KEY"📝 Response Example (Success)
{
"id": "task_xGOhEWZIx3qiVkqL7rCE0np45eaTM2HA",
"task_id": "task_xGOhEWZIx3qiVkqL7rCE0np45eaTM2HA",
"object": "video",
"model": "wan2.6-i2v-flash",
"status": "success",
"progress": 100,
"video_url": "https://example.com/output/wan_video_result.mp4",
"created_at": 1775026176
}💡 Developer Tips
- Polling: Video generation usually takes some time. After submitting a task, request this endpoint every 5-10 seconds until you get the result.
- State machine handling:
- While
queuedorprocessing, the frontend can display a progress bar. - When it becomes
success, display/downloadvideo_urldirectly. - When it becomes
failed, notify the user based onfail_reason.
- While
- Environment note: The URL in the example is the test environment
192.168.5.29:4000; switch to the production domain before going live.
Image-to-Video
Wan image-to-video API guide: turn a reference image and prompt into cinematic video with wan2.6-i2v-flash, covering request parameters and prompt tips.
anyrouter Privacy Policy
anyrouter Privacy Policy: API request content is never stored or used for training. Learn what metadata is kept for billing, security, and compliance.