查询豆包视频任务
查询豆包视频任务列表,或使用创建任务后返回的任务 ID 查询单个任务的状态和结果。
调用约定
| 项目 | 值 |
|---|---|
| Base URL | https://token.wdcloud.ai |
| 认证请求头 | Authorization: Bearer <API_KEY> |
查询任务列表
GET /seedance/api/v3/contents/generations/tasks
查询参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
page_num | integer | 否 | 页码,从 1 开始,默认值为 1 |
page_size | integer | 否 | 每页数量,默认值为 10 |
filter.status | string | 否 | 按任务状态过滤,可选 queued、running、succeeded、failed、cancelled、expired |
请求示例
bash
curl --location 'https://token.wdcloud.ai/seedance/api/v3/contents/generations/tasks?page_size=3&filter.status=succeeded' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>'响应参数
| 字段名 | 类型 | 描述 |
|---|---|---|
total | integer | 符合查询条件的任务总数 |
items | array | 任务列表,每项为一个任务对象,结构见下表 |
model | string | 实际使用的模型名称(解析后的完整模型名) |
任务对象字段
| 字段名 | 类型 | 描述 |
|---|---|---|
id | string | 任务 ID |
model | string | 实际使用的模型名称(解析后的完整模型名) |
status | string | 任务当前状态 |
content | object | 任务输出内容,仅在任务完成(succeeded)后返回 |
content.video_url | string | 生成视频的下载 URL(带签名,有时效性) |
usage | object | Token 用量信息,仅在任务完成后返回 |
usage.completion_tokens | integer | 生成 Token 数 |
usage.total_tokens | integer | 总 Token 数 |
created_at | integer | 任务创建时间(Unix 时间戳,秒) |
updated_at | integer | 任务更新时间(Unix 时间戳,秒) |
seed | integer | 生成种子值,任务完成后返回 |
resolution | string | 分辨率,如 720p,任务完成后返回 |
ratio | string | 视频宽高比,仅在任务成功后返回 |
duration | integer | 视频时长(秒),取值范围为 4 到 15;也可设置为 -1(智能选择),仅在任务成功后返回 |
framespersecond | integer | 视频帧率,如 24,任务完成后返回 |
service_tier | string | 服务级别,如 default |
execution_expires_after | integer | 任务结果保留时长(秒) |
generate_audio | boolean | 是否生成音频,默认值为 true |
draft | boolean | 是否为草稿 |
priority | integer | 任务优先级 |
output_format | string | 输出格式,如 mp4 |
响应示例
json
{
"total": 94,
"items": [
{
"id": "cgt-20260810111537-s92q8",
"model": "doubao-seedance-2-0-260128",
"status": "running",
"created_at": 1786331737,
"updated_at": 1786331737,
"service_tier": "default",
"execution_expires_after": 172800,
"generate_audio": true,
"draft": false,
"priority": 0,
"output_format": "mp4"
},
{
"id": "cgt-20260810104630-pn8c6",
"model": "doubao-seedance-2-0-260128",
"status": "succeeded",
"content": {
"video_url": "https://example.com/generated-video.mp4"
},
"usage": {
"completion_tokens": 411300,
"total_tokens": 411300
},
"created_at": 1786329995,
"updated_at": 1786330364,
"seed": 43602,
"resolution": "720p",
"ratio": "16:9",
"duration": 11,
"framespersecond": 24,
"service_tier": "default",
"execution_expires_after": 172800,
"generate_audio": true,
"draft": false,
"priority": 0,
"output_format": "mp4"
}
],
"model": "doubao-seedance-2-0-260128"
}查询单个任务
GET /seedance/api/v3/contents/generations/tasks/{task_id}
路径参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
task_id | string | 是 | 任务 ID,由创建任务接口返回 |
请求示例
bash
curl --location 'https://token.wdcloud.ai/seedance/api/v3/contents/generations/tasks/cgt-20260805135727-2vgwr' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>'响应参数
响应字段与任务列表中的任务对象一致。content 和 usage 仅在任务完成后返回,生成参数和结果信息可能随任务状态逐步补充。
响应示例
json
{
"id": "cgt-20260810104630-pn8c6",
"model": "doubao-seedance-2-0-260128",
"status": "succeeded",
"content": {
"video_url": "https://example.com/generated-video.mp4"
},
"usage": {
"completion_tokens": 411300,
"total_tokens": 411300
},
"created_at": 1786329995,
"updated_at": 1786330364,
"seed": 43602,
"resolution": "720p",
"ratio": "16:9",
"duration": 11,
"framespersecond": 24,
"service_tier": "default",
"execution_expires_after": 172800,
"generate_audio": true,
"draft": false,
"priority": 0,
"output_format": "mp4"
}