跳转到主要内容
POST
/
v1
/
tasks
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2-pro",
    "action": "generate",
    "prompt": "A cat playing piano in a jazz club, cinematic lighting",
    "aspect_ratio": "16:9",
    "duration": 8,
    "resolution": "1080p"
  }'
{
  "task_id": "task-wave1775285160b950328499",
  "model": "sora-2-pro",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}
异步处理模式 — 提交请求后返回任务 ID,通过 查询任务状态 接口获取生成结果。
Sora 2 系列模型将于 2026 年 9 月 24 日停止服务。
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2-pro",
    "action": "generate",
    "prompt": "A cat playing piano in a jazz club, cinematic lighting",
    "aspect_ratio": "16:9",
    "duration": 8,
    "resolution": "1080p"
  }'
{
  "task_id": "task-wave1775285160b950328499",
  "model": "sora-2-pro",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}

可用模型

模型 IDresolution 支持说明
sora-2-pro720p1080p高画质,支持 1080p
sora-2720p速度更快

统一参数

model
string
必填
模型 ID
action
string
默认值:"generate"
操作类型:generateremixextend
prompt
string
必填
视频描述文本
callback_url
string
Webhook 回调地址
extra
object
透传给 Sora 的额外参数

各操作类型参数

文生视频或图生视频。
aspect_ratio
string
默认值:"9:16"
宽高比:16:99:16
duration
integer
默认值:"4"
视频时长(秒):48121620
resolution
string
默认值:"720p"
输出分辨率。1080psora-2-pro 支持
image_urls
string[]
参考图片 URL,用于首帧引导。图片宽高比需与 aspect_ratio 一致
extra.characters
array
角色资产数组,最多 2 个。角色名称必须在 prompt 中被提及

响应

task_id
string
任务 ID
model
string
使用的模型 ID
action
string
操作类型
status
string
任务状态:queued
created_at
integer
创建时间(Unix 毫秒时间戳)
progress
integer
进度,初始为 0