Skip to content

查询视频状态

Sora 视频状态查询接口,用于查看指定视频任务的当前状态和结果信息。


概览

  • 请求方法:GET
  • 请求路径:/v1/videos/{task_id}
  • 内容类型:application/json
  • 分类:视频模型(Video)/sora视频

认证方式

  • Header:Authorization: Bearer <token>

路径参数

参数类型必填描述
task_idstring视频任务 ID

请求示例

curl 示例

bash
curl -X GET "https://api.gpt.ge/v1/videos/your_task_id" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_TOKEN"

JavaScript (fetch) 示例

javascript
fetch('https://api.gpt.ge/v1/videos/your_task_id', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_TOKEN'
  }
})
  .then(res => res.json())
  .then(console.log)

Python 示例(requests)

python
import requests

resp = requests.get(
    'https://api.gpt.ge/v1/videos/your_task_id',
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_TOKEN'
    }
)
print(resp.json())

返回字段说明

字段类型描述
idstring视频任务 ID
objectstring返回对象类型,一般为 video
created_atinteger创建时间戳
statusstring任务状态
completed_atinteger完成时间戳
errornull错误信息,成功时为 null
expires_atinteger过期时间戳
modelstring使用的模型
progressinteger任务进度
remixed_from_video_idnullremix 源视频 ID,当前未使用时为 null
secondsstring视频时长
sizestring视频尺寸

返回示例(200)

json
{
  "id": "video_68f082321ed08193a4eaf01376fa10bc0284bd663de64dc5",
  "object": "video",
  "created_at": 1760592434,
  "status": "completed",
  "completed_at": 1760592506,
  "error": null,
  "expires_at": 1760596106,
  "model": "sora-2",
  "progress": 100,
  "remixed_from_video_id": null,
  "seconds": "4",
  "size": "720x1280"
}