获取视频任务状态
GET /v1/videos/{task_id}
OpenAI 兼容的视频任务状态查询接口。
返回视频任务的详细状态信息。
基本信息
| 项目 | 内容 |
|---|---|
| Base URL | https://www.yunzhuhub.cn |
| 标签 | 视频生成/Sora兼容格式 |
| Operation ID | getVideo |
认证
- BearerAuth:使用 Bearer Token 认证。 格式:
Authorization: Bearer sk-xxxxxx
密钥安全
请只使用你自己的 API Key。示例中的 <YOUR_API_KEY> 必须在本地替换,不要把真实密钥提交到代码仓库或发送给他人。
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
task_id | path | string | 是 | 视频任务 ID |
请求体
此接口没有请求体。
请求示例
以下示例只用于复制到本地终端,不会从文档站发送请求。
bash
curl --request GET 'https://www.yunzhuhub.cn/v1/videos/{task_id}' \
--header 'Authorization: Bearer <YOUR_API_KEY>'响应
200 成功获取视频任务状态
json
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"model": {
"type": "string"
},
"status": {
"type": "string"
},
"progress": {
"type": "integer"
},
"created_at": {
"type": "integer"
},
"seconds": {
"type": "string"
}
},
"required": [
"id",
"object",
"model",
"status",
"progress",
"created_at",
"seconds"
]
}404 任务不存在
json
{
"title": "ErrorResponse",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "错误信息"
},
"type": {
"type": "string",
"description": "错误类型"
},
"param": {
"type": "string",
"description": "相关参数",
"nullable": true
},
"code": {
"type": "string",
"description": "错误代码",
"nullable": true
}
}
}
}
}