API 参考
任务状态 API:轮询、列出和删除
一个任务就是一次生成。所有接口和回调返回的都是同一个任务对象。
获取 API 密钥Wan 3 API 团队 ·
查询任务
GEThttps://api.wan3api.org/v1/tasks/{id}
返回任务;任务仍在生成时会顺便检查最新进度。建议每 5 到 10 秒轮询一次。
curl "https://api.wan3api.org/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $API_KEY"状态
| status | |
|---|---|
processing | 已提交,生成中。progress 从 0 到 99。 |
succeeded | 已完成,video_url 已就绪。 |
failed | 生成失败。error 说明原因,refunded 为 true:积分已退回余额。 |
等待视频
# Poll every few seconds until status is "succeeded" or "failed".
curl "https://api.wan3api.org/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $API_KEY"
# Then download the video.
curl -L -o video.mp4 "$VIDEO_URL"列出任务
GEThttps://api.wan3api.org/v1/tasks?limit=20
按时间倒序返回你的任务,包括 API 和网页端发起的。limit 取 1 到 50,默认 20。
curl "https://api.wan3api.org/v1/tasks?limit=20" \
-H "Authorization: Bearer $API_KEY"删除任务
DELETEhttps://api.wan3api.org/v1/tasks/{id}
删除已完成的任务及其视频文件。仍在生成的任务返回 409 task_processing。
curl -X DELETE "https://api.wan3api.org/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $API_KEY"任务对象
credits 是本次花费,refunded 表示是否已退回。source 为 api 或 web。时间均为 UTC 的 ISO 8601 格式。
json
{
"id": "3f1c9a52-6d1e-4c1b-9a77-2f4d8f0c9e10",
"object": "video.generation",
"model": "wan-3",
"mode": "text",
"status": "succeeded",
"progress": 100,
"prompt": "A red fox runs through fresh snow at sunrise, slow motion, cinematic",
"duration": 5,
"resolution": "480P",
"aspect_ratio": "16:9",
"video_url": "https://api.wan3api.org/api/video/media/video/outputs/…/3f1c9a52.mp4",
"credits": 15,
"refunded": false,
"error": null,
"source": "api",
"created_at": "2026-11-01T08:00:00.000Z",
"completed_at": "2026-11-01T08:00:41.000Z"
}