查询视频生成任务 API
火山文档原文GET /api/v3/contents/generations/tasks/{task_id}
Authorization
BearerAuth
AuthorizationBearer <token>
输入 API Token。请求将使用 Authorization: Bearer 。
In: header
Path Parameters
task_id*string
需要查询的视频生成任务 ID
Response Body
application/json
application/json
application/json
curl -X GET "https://jieyun.cc/api/v3/contents/generations/tasks/cgt-2026-example"{
"id": "cgt-2026-example",
"model": "doubao-seedance-2-0-260128",
"status": "succeeded",
"content": {
"video_url": "https://example.com/video.mp4"
},
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"created_at": 1784718000,
"updated_at": 1784718060,
"usage": {
"completion_tokens": 1000,
"total_tokens": 1000
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}接口说明
根据任务 ID 查询视频生成任务的状态和输出内容。本文档已按火山引擎官方接口说明校对。
GET https://jieyun.cc/api/v3/contents/generations/tasks/{task_id}
Authorization: Bearer <API_KEY>查询范围与视频地址有效期
仅支持查询最近 7 天的任务记录,时间区间为 [T-7 天, T),其中 T 为请求发起时刻的 UTC
时间戳(精确到秒)。响应中的视频和尾帧 URL 有效期为 24 小时,请及时下载或转存。
请求参数
| Path 参数 | 类型 | 必选 | 说明 |
|---|---|---|---|
task_id | string | 是 | 创建任务接口返回的视频生成任务 ID。 |
请求示例:
curl "https://jieyun.cc/api/v3/contents/generations/tasks/cgt-2026-example" \
-H "Authorization: Bearer <API_KEY>"响应内容
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 视频生成任务 ID。 |
model | string | 任务使用的模型名称和版本。 |
status | string | queued、running、cancelled、succeeded、failed 或 expired。 |
error | object / null | 成功时为 null;失败时包含 code 和 message。 |
created_at | integer | 任务创建时间的 Unix 时间戳(秒)。 |
updated_at | integer | 任务状态更新时间的 Unix 时间戳(秒)。 |
content.video_url | string | 生成视频 MP4 URL,有效期为 24 小时。 |
content.last_frame_url | string | 尾帧图片 URL;创建任务时设置 return_last_frame: true 才返回,有效期为 24 小时。 |
seed | integer | 本次请求使用的种子。 |
resolution | string | 实际生成视频的分辨率。 |
ratio | string | 实际生成视频的宽高比。 |
duration | integer | 视频时长(秒);与 frames 只返回一个。 |
frames | integer | 视频帧数;与 duration 只返回一个。 |
framespersecond | integer | 生成视频帧率。 |
generate_audio | boolean | 是否包含同步音频。 |
tools | object[] | 模型实际使用的工具;未使用工具时不返回。 |
usage.completion_tokens | integer | 生成视频消耗的 token 数量,可用于计费对账。 |
usage.total_tokens | integer | 总 token 数;视频任务不统计输入 token。 |
usage.tool_usage.web_search | integer | 联网搜索工具的实际调用次数。 |
成功响应示例:
{
"id": "cgt-2026-example",
"model": "doubao-seedance-2-0-260128",
"status": "succeeded",
"content": {
"video_url": "https://example.com/video.mp4"
},
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"created_at": 1784718000,
"updated_at": 1784718060,
"usage": {
"completion_tokens": 1000,
"total_tokens": 1000
}
}