查询视频生成状态
视频生成
查询视频生成状态
GET
查询视频生成状态
Documentation Index
Fetch the complete documentation index at: https://docs.senseaudio.cn/llms.txt
Use this file to discover all available pages before exploring further.
说明
根据任务 ID 查询视频生成任务的当前状态、进度与最终结果。视频生成为异步任务,建议创建任务后每 5–10 秒轮询一次状态,直到返回
completed 或 failed。接口概览
| 项目 | 值 |
|---|---|
| 接口地址 | https://api.senseaudio.cn/v1/video/status |
| 请求方式 | GET |
| Content-Type | application/json |
| 鉴权方式 | Bearer Token |
请求头
| 参数名 | 必填 | 说明 | 示例 |
|---|---|---|---|
Authorization | 是 | 鉴权 Token,格式 Bearer SENSEAUDIO_API_KEY | Bearer sk-123456... |
Content-Type | 是 | 固定为 application/json | application/json |
请求参数(Query)
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
id | string | 是 | 创建任务时返回的任务 ID |
响应结构
| 参数名 | 类型 | 描述 |
|---|---|---|
id | string | 记录 ID |
model | string | 模型名称 |
task_id | string | 任务 ID |
status | string | 任务状态,见下表 |
progress | int64 | 进度百分比 |
video_url | string | 视频 URL(completed 后返回) |
duration | int64 | 实际视频时长(秒) |
is_new | boolean | 是否为新视频 |
error_message | string | 错误信息(failed 时返回) |
created_at | int64 | 创建时间戳 |
completed_at | int64 | 完成时间戳 |
prompt | string | 提示词 |
resolution | string | 分辨率,如 720p |
ratio | string | 宽高比,如 16:9、9:16 |
content | array | 描述视频的文字或图片 |
provider_specific | object | 模型特殊参数 |
状态说明
| 状态值 | 说明 |
|---|---|
pending | 等待处理 |
processing | 处理中 |
completed | 已完成 |
failed | 失败 |
响应示例
代码示例
注意事项
- 轮询建议:视频生成需要时间,建议每 5–10 秒查询一次状态
- 超时处理:如果长时间处于
processing状态,可能需要重新创建任务 - 错误处理:当
status为failed时,查看error_message了解失败原因
授权
格式:Bearer <API_KEY>
查询参数
响应
200 - application/json
成功
记录 ID
模型名称
任务 ID
任务状态
可用选项:
pending, processing, completed, failed 进度百分比
视频 URL(completed 后返回)
实际视频时长(秒)
是否为新视频
错误信息(failed 时返回)
创建时间戳
完成时间戳
提示词
分辨率,如 720p、1080p
宽高比,如 16:9、9:16、4:3、3:4、1:1
描述视频的文字、图片、音频或视频
厂商特定参数