cURL - 查询任务结果
请先获取 API Key 并设置为环境变量。
异步任务查询接口提供 20 QPS 的访问流量限制。
状态说明
| 状态 | 说明 |
|---|---|
PENDING | 排队中 |
RUNNING | 处理中 |
SUCCEEDED | 成功 |
FAILED | 失败 |
CANCELED | 已取消 |
UNKNOWN | 任务不存在或状态未知 |
根据任务 ID 查询 AnimateAnyone 动作模板生成任务的状态和结果
curl -X GET \
--header 'Authorization: Bearer $DASHSCOPE_API_KEY' \
https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}{
"request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51",
"output": {
"task_id": "a8532587-fa8c-4ef8-82be-0c46b17950d1",
"task_status": "SUCCEEDED",
"template_id": "AACT.xxx.xxx-xxx.xxx"
},
"usage": {
"video_duration": 10.23,
"video_ratio": "standard"
}
}| 状态 | 说明 |
|---|---|
PENDING | 排队中 |
RUNNING | 处理中 |
SUCCEEDED | 成功 |
FAILED | 失败 |
CANCELED | 已取消 |
UNKNOWN | 任务不存在或状态未知 |
千问云 API Key。详见获取 API Key。
需要查询任务的task_id。
本次请求的系统唯一码。
显示子属性
查询任务的 task_id。
被查询任务的任务状态。
平台输出的动作模板ID,可作为"Animate-Anyone 视频生成接口"的入参。动作模板ID会进行权限校验,请确保使用template_id的云账号与当前生产该动作模板的云账号一致。
错误码,任务失败时返回。
错误详情,任务失败时返回。
curl -X GET \
--header 'Authorization: Bearer $DASHSCOPE_API_KEY' \
https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}{
"request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51",
"output": {
"task_id": "a8532587-fa8c-4ef8-82be-0c46b17950d1",
"task_status": "SUCCEEDED",
"template_id": "AACT.xxx.xxx-xxx.xxx"
},
"usage": {
"video_duration": 10.23,
"video_ratio": "standard"
}
}