GET
/tasks/{task_id}
查询任务结果
复制
curl -X GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id} \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"复制
{
"request_id": "95146d89-9d70-481a-8c16-xxxxxx",
"output": {
"task_id": "2c502d25-12a9-4517-8972-xxxxxx",
"task_status": "SUCCEEDED",
"submit_time": "2026-03-27 22:46:01.536",
"scheduled_time": "2026-03-27 22:46:01.580",
"end_time": "2026-03-27 22:46:24.831",
"finished": true,
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{
"image": "https://p4-fdl.klingai.com/xxx.png?xxx",
"type": "image"
},
{
"image": "https://p4-fdl.klingai.com/xxx.png?xxx",
"type": "image"
}
]
}
}
]
},
"usage": {
"size": "1024*1024",
"image_count": 2,
"SR": "1080"
}
}鉴权
string
header
必填
千问云 API Key。详见获取 API Key。
路径参数
string
必填
任务ID,由创建任务接口返回。
响应
200-application/json
string
请求唯一标识。可用于请求明细溯源和问题排查。
object
任务输出信息。
显示子属性
显示子属性
string
任务ID。
enum<string>
任务状态。
可选值:PENDING,RUNNING,SUCCEEDED,FAILED,CANCELED,UNKNOWN
string
任务提交时间。
string
任务调度时间。
string
任务结束时间。
boolean
任务是否已完成。
object
string
请求失败的错误码。请求成功时不会返回此参数。
string
请求失败的详细信息。请求成功时不会返回此参数。

