切换主题
获取视频生成任务状态
查询视频生成任务的状态和结果。
任务状态:
queued: 排队中in_progress: 生成中completed: 已完成failed: 失败
获取视频生成任务状态
GET /v1/video/generations/{task_id}
查询视频生成任务的状态和结果。
任务状态:
queued: 排队中in_progress: 生成中completed: 已完成failed: 失败
认证
BearerAuth
请求参数
| 名称 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| task_id | path | 是 | string | 任务 ID |
响应
200 成功获取任务状态
application/json
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| task_id | 否 | string | 任务 ID Examples: abcd1234efgh |
| status | 否 | enum: queued | in_progress | completed | failed | 任务状态 Examples: completed |
| url | 否 | string | 视频资源 URL(成功时) Examples: https://example.com/video.mp4 |
| format | 否 | string | 视频格式 Examples: mp4 |
| metadata | 否 | object | 视频任务元数据 |
| metadata.duration | 否 | number | 实际生成的视频时长 Examples: 5 |
| metadata.fps | 否 | integer | 实际帧率 Examples: 30 |
| metadata.width | 否 | integer | 实际宽度 Examples: 1280 |
| metadata.height | 否 | integer | 实际高度 Examples: 720 |
| metadata.seed | 否 | integer | 使用的随机种子 Examples: 20231234 |
| error | 否 | object | 视频任务错误信息 |
| error.code | 否 | integer | 错误码 |
| error.message | 否 | string | 错误信息 |
原始 Schema
json
{
"type": "object",
"description": "视频任务状态查询响应",
"properties": {
"task_id": {
"type": "string",
"description": "任务 ID",
"examples": [
"abcd1234efgh"
]
},
"status": {
"type": "string",
"description": "任务状态",
"enum": [
"queued",
"in_progress",
"completed",
"failed"
],
"examples": [
"completed"
]
},
"url": {
"type": "string",
"description": "视频资源 URL(成功时)",
"examples": [
"https://example.com/video.mp4"
]
},
"format": {
"type": "string",
"description": "视频格式",
"examples": [
"mp4"
]
},
"metadata": {
"type": "object",
"description": "视频任务元数据",
"properties": {
"duration": {
"type": "number",
"description": "实际生成的视频时长",
"examples": [
5
]
},
"fps": {
"type": "integer",
"description": "实际帧率",
"examples": [
30
]
},
"width": {
"type": "integer",
"description": "实际宽度",
"examples": [
1280
]
},
"height": {
"type": "integer",
"description": "实际高度",
"examples": [
720
]
},
"seed": {
"type": "integer",
"description": "使用的随机种子",
"examples": [
20231234
]
}
},
"x-apifox-orders": [
"duration",
"fps",
"width",
"height",
"seed"
]
},
"error": {
"type": "object",
"description": "视频任务错误信息",
"properties": {
"code": {
"type": "integer",
"description": "错误码"
},
"message": {
"type": "string",
"description": "错误信息"
}
},
"x-apifox-orders": [
"code",
"message"
]
}
},
"x-apifox-orders": [
"task_id",
"status",
"url",
"format",
"metadata",
"error"
]
}404 任务不存在
application/json
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| error | 否 | object | - |
| error.message | 否 | string | 错误信息 |
| error.type | 否 | string | 错误类型 |
| error.param | 否 | string | null | 相关参数 |
| error.code | 否 | string | null | 错误代码 |
原始 Schema
json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "错误信息"
},
"type": {
"type": "string",
"description": "错误类型"
},
"param": {
"type": [
"string",
"null"
],
"description": "相关参数"
},
"code": {
"type": [
"string",
"null"
],
"description": "错误代码"
}
},
"x-apifox-orders": [
"message",
"type",
"param",
"code"
]
}
},
"x-apifox-orders": [
"error"
]
}