跳转到主要内容
POST
/
api
/
open-api
/
v1
/
videos
Create Video Task
curl --request POST \
  --url https://www.jimmyai.cn/api/open-api/v1/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "prompt": "<string>",
  "duration": 123,
  "images": [
    "<string>"
  ]
}
'
{
  "code": "20000",
  "msg": "ok",
  "data": {
    "task_id": "<string>",
    "status": "<string>",
    "model": "<string>",
    "created_at": 123
  }
}

线路与模型

在开放平台为模型配置 route 后,通过本接口创建任务。常用 Sora 模型示例:
线路route 配置模型示例时长
线路一route1sora2-12s12
线路三route3sora2-gz-stablesora2-gz-sp按模型
线路六route6openai-sora-2按模型

线路一(sora2-12s

  • duration 必须为 12
  • orientationlandscape → 16:9,portrait → 9:16
  • 可选 images 传一张参考图 URL(图生视频)
  • 任务查询与其它视频任务相同:查询视频任务
视频结果 URL 保存约 3 天,请及时转存。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
model
string
必填

Model name. Route 1: sora2-12s (duration must be 12). Route 3: sora2-gz-stable, sora2-gz-sp, etc.

prompt
string
必填

Text prompt for video generation

duration
integer
必填

Duration in seconds. Route 1 sora2-12s must be 12

orientation
enum<string>

Video orientation

可用选项:
landscape,
portrait
images
string[]

Reference image URLs

响应

200 - application/json

Task created successfully

code
string
示例:

"20000"

msg
string
示例:

"ok"

data
object