跳转到主要内容
POST
/
api
/
open-api
/
v1
/
gemini
/
omni
/
videos
Create Gemini Omni Video Task
curl --request POST \
  --url https://www.jimmyai.cn/api/open-api/v1/gemini/omni/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "Gemini-Omini",
  "prompt": "A cat running through a neon rainy street, cinematic low-angle tracking shot",
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "generation_type": "reference",
  "image_urls": [],
  "video_urls": []
}
'
{
  "code": "20000",
  "msg": "ok",
  "data": {
    "task_id": "<string>",
    "status": "<string>",
    "model": "<string>",
    "created_at": 123
  }
}
创建成功后会返回 task_id。请使用 查询视频任务 接口轮询任务状态,任务完成后从 result.video_url 获取视频地址。

支持的模型

model说明
Gemini-Omini标准 Gemini Omni,支持 4/6/8/10 秒与 720p/1080p/4k
omni-10s固定 10 秒、720p,支持最多 7 张参考图(图片或视频 URL)
Omni-Flash-Extgemini-omni 等别名会归一化为 Gemini-Omini

参考视频与生成模式

标准版 Gemini-Omini 支持以下高级参数以实现视频参考和不同的使用模式:
  • generation_type (string):生成类型,可选 frame(首帧模式,image_urls 只能传 1 张图片作为视频首帧)或 reference(参考模式,image_urls 可以传 1 张或 3 张图片作为参考图)。默认为 reference
  • video_urls (array):参考视频 URL 列表(目前最多支持 1 个视频)。注意:上传参考视频(使用 video_urls)时不需要传入 duration,且 durationvideo_urls 不可以同时传入。

omni-10s 示例

curl -X POST 'https://www.jimmyai.cn/api/open-api/v1/gemini/omni/videos' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "omni-10s",
    "prompt": "参考素材中的角色在赛博朋克街头奔跑,电影感跟拍",
    "aspect_ratio": "16:9",
    "image_urls": ["https://example.com/ref1.jpg"]
  }'
omni-10s 会忽略请求中的 durationresolution,统一按 10 秒、720p 计费(模型名 omni-10s)。

授权

Authorization
string
header
必填

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

请求体

application/json
model
enum<string>
必填

Model name. Gemini-Omini, Omni-Flash-Ext, and gemini-omni normalize to Gemini-Omini; omni-10s is a fixed 10s model (720p, up to 7 reference images).

可用选项:
Gemini-Omini,
Omni-Flash-Ext,
gemini-omni,
omni-10s
prompt
string
必填

Text prompt for video generation

duration
integer
默认值:6

Video duration in seconds. Default: 6. Only supports: 4, 6, 8, 10. Note: duration is not required when uploading a reference video, and duration and video_urls cannot be passed at the same time.

resolution
enum<string>
默认值:720p

Video resolution. Defaults to 720p.

可用选项:
720p,
1080p,
4k
aspect_ratio
string

Video aspect ratio, for example 16:9 or 9:16. Takes precedence over orientation.

orientation
enum<string>

Video orientation. Used only when aspect_ratio is empty: landscape maps to 16:9, portrait maps to 9:16.

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

Reference image URL list. omni-10s supports up to 7 images.

images
string[]

Compatibility field for common OpenAPI image inputs; used when image_urls is empty. omni-10s supports up to 7 images.

generation_type
enum<string>
默认值:reference

Generation type. frame: first frame mode (image_urls can only accept 1 image as the first frame of the video); reference: reference mode (image_urls can accept 1 or 3 images as style/subject reference). Defaults to reference.

可用选项:
frame,
reference
video_urls
string[]

Reference video URL list (currently supports up to 1 video). Note: duration is not required when uploading a reference video, and duration and video_urls cannot be passed at the same time.

响应

200 - application/json

Task created successfully

code
string
示例:

"20000"

msg
string
示例:

"ok"

data
object