查询视频生成任务
更新时间:2026-11-30
使用本接口,查询使用文心一镜(ERNIE-Wizshot-R1)发起的视频生成任务进展。
GET
https://qianfan.baidubce.com/v2/mm/ernie/tasks
根据 task_id 查询使用文心一镜(ERNIE-Wizshot-R1)发起的特定视频生成任务生成。
权限说明
调用本文API,需使用API Key鉴权方式。使用API Key鉴权调用API流程,具体调用流程,请查看认证鉴权。
请求参数
Headers 参数
除公共头域外,无其它特殊头域
Query 参数
task_id
string
需要查询的视频生成任务的 task_id。
必选
请求结构
GET /v2/mm/ernie/tasks?task_id={task_id} HTTP/1.1
Host: qianfan.baidubce.com
Authorization: authorization string
示例代码
请求示例
curl --location 'https://qianfan.baidubce.com/v2/mm/ernie/tasks?task_id=81ae77ddeee14250aedae79a4cf29158' \
--header 'Authorization: Bearer your-api-key'
返回响应
Headers 参数
除公共头域外,无其它特殊头域
返回参数
id
string
响应唯一标识,以 as- 开头。
可选
task_id
string
任务唯一标识,取自创建接口返回。
可选
model
string
生成任务使用的模型名称。
可选
status
string
任务状态:pending(已创建)、processing(运行中)、succeeded(生成成功)、failed(生成失败)、canceled(已取消)。
可选
created_at
integer
任务创建时间,Unix 时间戳,单位为秒。
可选
updated_at
integer
任务最近更新时间,Unix 时间戳,单位为秒。
可选
content
object {2}
任务结果数据,任务成功时返回,否则为 null。
可选
显示子属性
隐藏子属性
video_url
string
生成视频的临时访问 URL。
可选
watermark_video_url
string
带水印视频 URL,只有输出包含水印版视频时才返回。
可选
usage
object {5}
任务用量数据,任务成功时返回,否则为 null。
可选
显示子属性
隐藏子属性
input_duration
number
本次输入视频素材的时长之和(秒,如 3 个 5s 视频返回 15);无视频素材或探测失败时为 0 且不返回。
可选
duration
number
生成视频的时长,单位为秒。
可选
resolution
string
生成视频的清晰度。
可选
width
integer
视频宽(像素)。
可选
height
integer
视频高(像素)。
可选
error
object {3}
成功时返回 null,失败时返回错误数据。
可选
显示子属性
隐藏子属性
code
string
错误码。
可选
message
string
错误信息描述。
可选
type
string
错误类型。
可选
响应示例
{
"id": "as-***",
"task_id": "tdsx***k9",
"model": "ernie-wizshot-r1",
"status": "succeeded",
"created_at": 1743414619,
"updated_at": 1743414673,
"content": {
"video_url": "https://fc-***.mp4"
},
"usage": {
"duration": 5.0,
"resolution": "1080P",
"width": 1920,
"height": 1080
}
}
错误码
如果调用失败并返回报错信息,请参见错误码进行解决。
公共错误码:查看公共错误码
本接口专有错误码如下:
| http状态码 | type | code | message |
|---|---|---|---|
| 500 | internal_error | video_generation_internal_error | video generation service internal error |
| 400 | invalid_request_error | invalid_video_generation_argument | xxx |
| 429 | rate_limit_exceeded | video_generation_concurrency_exceeded | Rate limit reached for Concurrency |
| 403 | unsafe_request | video_generation_prompt_unsafe | The input image/prompt is unsafe. |
| 403 | unsafe_request | video_generation_output_unsafe | The output is unsafe. |
| 501 | internal_error | video_generation_risk_system_error | risk control system internal error |
评价此篇文章
