Skip to main content
POST
/
v1
/
videos
OpenAI 视频兼容接口
curl --request POST \
  --url https://api.example.com/v1/videos \
  --header 'Content-Type: application/json' \
  --data '
{
  "task_id": "<string>",
  "video_id": "<string>",
  "model": "<string>",
  "prompt": "<string>",
  "image": "<string>",
  "seconds": "<string>",
  "size": "<string>",
  "metadata": {}
}
'
{
  "id": "video_abc123",
  "task_id": "video_abc123",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "seconds": "5",
  "size": "1280x720"
}

Documentation Index

Fetch the complete documentation index at: https://mercury-eab3b728.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

OpenAI 视频兼容接口

这组路由对外表现为 OpenAI Videos API 风格,适合已经按 video 对象读写结果的客户端。
  • 创建、查询和 remix 统一使用 OpenAI 风格 video 对象。
  • 公开 id 会映射到平台任务 ID,而不是直接暴露上游原始任务 ID。
  • content 代理路由支持 API Key 和登录态访问。
  • Remix 会优先回查原视频任务并锁定到原始渠道执行。

路由清单

MethodPath说明
POST/v1/videos创建视频任务
GET/v1/videos/{task_id}查询视频任务
POST/v1/videos/{video_id}/remix基于已有视频任务做 remix
GET/v1/videos/{task_id}/content代理下载视频内容

请求示例

curl -X POST https://www.geeknow.top/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "一架纸飞机穿过明亮办公室,镜头平滑跟随",
    "seconds": "5",
    "size": "1280x720"
  }'

响应示例

{
  "id": "video_abc123",
  "task_id": "video_abc123",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "seconds": "5",
  "size": "1280x720"
}

认证

创建、查询、remix 使用 Bearer Token:
Authorization: Bearer YOUR_API_KEY
GET /v1/videos/{task_id}/content 同时支持:
  • Authorization: Bearer YOUR_API_KEY
  • Web 仪表盘登录态 UserAuth

Path Parameters

task_id
string
required
视频任务 ID,用于查询和内容代理。
video_id
string
required
Remix 的源视频 ID。服务端会先用它回查原任务和原渠道。

Body

model
string
required
视频模型名称,例如 sora-2sora_video2 或其他渠道映射后的模型名。
prompt
string
required
视频描述或 remix 指令。
image
string
图生视频输入图。是否支持取决于具体上游。
seconds
string
目标视频时长,常见值为 51015
size
string
目标分辨率或比例,例如 1280x720720x128016:9
metadata
object
供应商透传参数。Remix 时也可以放入上游专有字段。

Response

id
string
公开视频任务 ID。
status
string
任务状态,常见值为 queuedin_progresscompletedfailed
video_url
string
生成完成后的可播放地址。很多情况下会指向平台代理路由。
error
object
失败任务的错误详情,仅在 status = failed 时出现。

使用场景

查询任务

curl https://www.geeknow.top/v1/videos/video_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Remix

curl -X POST https://www.geeknow.top/v1/videos/video_abc123/remix \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "保持构图,把画面改成夜晚霓虹灯风格"
  }'

代理下载

curl -L https://www.geeknow.top/v1/videos/video_abc123/content \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --output output.mp4

注意事项

如果你同时接入了 /v1/video/generations/v1/videos,建议前端固定选择一种返回结构使用,不要在同一套解析逻辑里混用通用任务包装和 OpenAI video 对象。

相关接口