公共
查询任务结果
GET
/
v3
/
async
/
task-result
curl --request GET \
--url https://api.ppinfra.com/v3/async/task-result \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'
{
"extra": {
"seed": "<string>",
"debug_info": {
"request_info": "<string>",
"submit_time_ms": "<string>",
"execute_time_ms": "<string>",
"complete_time_ms": "<string>"
}
},
"task": {
"task_id": "<string>",
"status": "<string>",
"reason": "<string>",
"task_type": "<string>",
"eta": 123,
"progress_percent": 123
},
"images": [
{
"image_url": "<string>",
"image_url_ttl": 123,
"image_type": "<string>"
}
],
"videos": [
{
"video_url": "<string>",
"video_url_ttl": "<string>",
"video_type": "<string>"
}
],
"audios": [
{
"audio_url": "<string>",
"audio_url_ttl": "<string>",
"audio_type": "<string>",
"audio_metadata": {
"text": "<string>",
"start_time": {},
"end_time": {}
}
}
]
}
「查询任务结果 API」用来获取异步任务返回的图像、音频或视频结果。
请求头
枚举值: application/json
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
查询参数
在异步 API 的 200 响应中返回的 task_id 值。
响应参数
任务详细信息。
任务 ID。
任务当前状态。TASK_STATUS_QUEUED
:任务排队中,等待处理;TASK_STATUS_SUCCEED
:任务已成功;TASK_STATUS_FAILED
:任务失败;TASK_STATUS_PROCESSING
:任务正在处理中;枚举值: TASK_STATUS_QUEUED, TASK_STATUS_SUCCEED, TASK_STATUS_FAILED, TASK_STATUS_PROCESSING
任务失败原因,当任务失败时,该字段有效。
任务的类型。
任务预计完成时间,以秒为单位。只有部分 API 该字段有效。
任务完成的进度百分比。此功能目前仅适用于:
1. 视频生成 API;
2. 文本到图像 API 和 图像到图像 API。
curl --request GET \
--url https://api.ppinfra.com/v3/async/task-result \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'
{
"extra": {
"seed": "<string>",
"debug_info": {
"request_info": "<string>",
"submit_time_ms": "<string>",
"execute_time_ms": "<string>",
"complete_time_ms": "<string>"
}
},
"task": {
"task_id": "<string>",
"status": "<string>",
"reason": "<string>",
"task_type": "<string>",
"eta": 123,
"progress_percent": 123
},
"images": [
{
"image_url": "<string>",
"image_url_ttl": 123,
"image_type": "<string>"
}
],
"videos": [
{
"video_url": "<string>",
"video_url_ttl": "<string>",
"video_type": "<string>"
}
],
"audios": [
{
"audio_url": "<string>",
"audio_url_ttl": "<string>",
"audio_type": "<string>",
"audio_metadata": {
"text": "<string>",
"start_time": {},
"end_time": {}
}
}
]
}