Skip to content

获取视频地址

Sora 视频地址获取接口,用于获取指定视频任务的最终播放/下载地址。


概览

  • 请求方法:GET
  • 请求路径:/v1/videos/{task_id}/content
  • 内容类型: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/content" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_TOKEN"

JavaScript (fetch) 示例

javascript
fetch('https://api.gpt.ge/v1/videos/your_task_id/content', {
  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/content',
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_TOKEN'
    }
)
print(resp.json())

返回字段说明

字段类型描述
idstring视频任务 ID
urlstring视频地址
expires_atinteger地址过期时间戳
statusstring地址状态

返回示例(200)

json
{
  "id": "video_68f082321ed08193a4eaf01376fa10bc0284bd663de64dc5",
  "url": "https://cdn.example.com/videos/video_68f082321ed08193a4eaf01376fa10bc0284bd663de64dc5.mp4",
  "expires_at": 1760596106,
  "status": "ready"
}