APIMaster.ai

Gemini Omni 1.1 Flash — 视频生成与编辑

官方和 Ext 渠道共用下方公开模型 ID,上游内部型号由服务器映射。

Gemini Omni 1.1 Flash

官方和 Ext 渠道共用下方公开模型 ID,上游内部型号由服务器映射。

gemini-omni-1.1-flash

渠道与模型映射

官方渠道自动生成约 3–10 秒视频,不传 duration;支持参考图片、首尾帧和视频编辑。Ext 指定 4、6、8、10 秒,默认 6 秒。两条渠道均支持 360p、720p、1080p、4k,以及横屏、竖屏。

公开模型 ID 始终相同。固定时长选择 Ext;首尾帧、metadata.task 和任务续写选择 Official。两条渠道都兼容时由用户分组选路,因此仅省略 duration 并不能保证进入 Official 或自动时长。需要官方自动时长文生视频时使用 metadata.task=text_to_video。

Official · 318 Ext · 319
model → upstream gemini-omni-1.1-flash gemini-omni-1.1-flash-ext
duration auto · 3–10s 4 / 6 / 8 / 10s · default 6s

POST https://apimaster.ai/v1/videos/generations · POST https://apimaster.ai/v1/videos

Authorization: Bearer YOUR_API_KEY · Content-Type: application/json

请求参数

参数 JSON 类型 渠道 默认值 必填 取值/限制
model string Official / Ext — ✓ gemini-omni-1.1-flash
prompt string Official / Ext — Ext ✓; Official: prompt / media Official: prompt / media; Ext: prompt
resolution string Official / Ext 720p — 360p / 720p / 1080p / 4k; Official: 2160p → 4k
aspect_ratio string Official / Ext 16:9 — 16:9 / 9:16
ratio string Official / Ext — — aspect_ratio
size string Official / Ext — — aspect_ratio
duration integer Ext 6 — 4 / 6 / 8 / 10; × video_urls
seconds integer Ext — — duration
image_urls string[] Official / Ext [] — HTTP/HTTPS; Official ≤ 10; Ext: frame = 1, reference = 1 / 3
first_frame_image string Official — — HTTP/HTTPS
last_frame_image string Official — — HTTP/HTTPS + first_frame_image
image_with_roles object[] Official — — [{"url":"https://…","role":"first_frame"}]
video_urls string[] Official / Ext [] — HTTP/HTTPS; ≤ 1; Official ≤ 10s; Ext: × duration
metadata object Official — — {"task":"text_to_video"}
metadata.task string Official — — text_to_video / image_to_video / reference_to_video / edit / extend
extend_from_task_id string Official — — task_…; completed; × video_urls
generation_type string Ext frame — frame / reference
nsfw_check boolean Ext false — true / false
image_with_roles[].url string Official — ✓ HTTP/HTTPS
image_with_roles[].role string Official — ✓ first_frame / last_frame / reference

参数约束

  • Ext 参考图模式只接受 1 张或 3 张图片;2 张图片同时携带 generation_type: "reference" 和固定 duration 时,没有兼容路由。需要 2 张参考图时,可使用可用的 Official 渠道,传 metadata: {"task":"reference_to_video"},省略 duration、seconds 和 generation_type;输出时长自动决定。
  • last_frame_image 必须同时提供 first_frame_image。显式首尾帧字段与 image_with_roles 二选一,不能混用。
  • Ext 中 duration(含 seconds 别名)与 video_urls 互斥;Official 不支持固定时长参数。
  • ratio、size 是 aspect_ratio 的别名,不表示分辨率。同时提供时必须一致;duration 与 seconds 同传也必须一致。
  • image_with_roles 每项包含 url 和 role,可用 first_frame、last_frame、reference;尾帧必须配首帧。素材使用公网可下载的 HTTP/HTTPS 直链。
  • 接口仅接受表中 JSON 字段,不支持 multipart 上传,也不支持 seed、fps、negative_prompt、generate_audio、n、callback_url 等字段。
  • video_urls 最多一段可下载视频;Official 编辑或续写的视频输入最长 10 秒。按任务续写须传本人已成功任务的公开 ID,并绑定原 Official 渠道。
  • nsfw_check 为 Ext 布尔参数,上游默认 false。启用提交前审核可能产生额外审核费用。

请求示例

curl "https://apimaster.ai/v1/videos/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini-omni-1.1-flash","prompt":"A paper boat floats on a sunlit lake, gentle camera movement.","resolution":"1080p","aspect_ratio":"16:9","metadata":{"task":"text_to_video"}}'

Official · text_to_video

{
  "model": "gemini-omni-1.1-flash",
  "prompt": "A paper boat floats on a sunlit lake, gentle camera movement.",
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "metadata": {
    "task": "text_to_video"
  }
}

Ext · duration

{
  "model": "gemini-omni-1.1-flash",
  "prompt": "A paper boat floats on a lake.",
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "9:16"
}

Official · first_frame_image / last_frame_image

{
  "model": "gemini-omni-1.1-flash",
  "prompt": "A smooth transition between the two views.",
  "first_frame_image": "https://YOUR_PUBLIC_HOST/start.jpg",
  "last_frame_image": "https://YOUR_PUBLIC_HOST/end.jpg",
  "resolution": "1080p"
}

Official · image_with_roles

{
  "model": "gemini-omni-1.1-flash",
  "prompt": "A smooth camera movement.",
  "image_with_roles": [
    {
      "url": "https://YOUR_PUBLIC_HOST/start.jpg",
      "role": "first_frame"
    },
    {
      "url": "https://YOUR_PUBLIC_HOST/end.jpg",
      "role": "last_frame"
    }
  ],
  "resolution": "720p"
}

Ext · generation_type=reference

{
  "model": "gemini-omni-1.1-flash",
  "prompt": "Combine the subjects and visual style from these references.",
  "duration": 8,
  "generation_type": "reference",
  "image_urls": [
    "https://YOUR_PUBLIC_HOST/a.jpg",
    "https://YOUR_PUBLIC_HOST/b.jpg",
    "https://YOUR_PUBLIC_HOST/c.jpg"
  ],
  "resolution": "720p"
}

Official · metadata.task=edit

{
  "model": "gemini-omni-1.1-flash",
  "prompt": "Keep the scene but change the lighting to sunset.",
  "metadata": {
    "task": "edit"
  },
  "video_urls": [
    "https://YOUR_PUBLIC_HOST/input.mp4"
  ],
  "resolution": "1080p"
}

Ext · video_urls

{
  "model": "gemini-omni-1.1-flash",
  "prompt": "Use the camera motion of the reference video.",
  "generation_type": "reference",
  "video_urls": [
    "https://YOUR_PUBLIC_HOST/reference.mp4"
  ],
  "resolution": "720p"
}

Official · extend_from_task_id

{
  "model": "gemini-omni-1.1-flash",
  "prompt": "Continue the scene with a slow camera move.",
  "extend_from_task_id": "task_YOUR_COMPLETED_OFFICIAL_TASK",
  "metadata": {
    "task": "extend"
  },
  "resolution": "720p"
}

查询与下载

{"id":"task_...","task_id":"task_...","object":"video","model":"gemini-omni-1.1-flash","status":"queued"}

每 5–10 秒查询,直至 completed 或 failed。使用同一个 API Key 下载视频;成功后可在使用日志查看视频链接。

curl "https://apimaster.ai/v1/videos/task_..." -H "Authorization: Bearer YOUR_API_KEY"
curl -L "https://apimaster.ai/v1/videos/task_.../content" -H "Authorization: Bearer YOUR_API_KEY" -o video.mp4

queued → in_progress → completed / failed

{"id":"task_...","task_id":"task_...","object":"video","model":"gemini-omni-1.1-flash","status":"completed","progress":100,"url":"https://apimaster.ai/v1/videos/task_.../content","metadata":{"url":"https://apimaster.ai/v1/videos/task_.../content"}}

Google 官方原价

2026-10-23 · USD · $17.50 / 1,000,000 output token

分辨率 输出 token/秒 视频输出美元/秒
360p 1,931 $0.0337925
720p 5,792 $0.10136
1080p 8,688 $0.15204
4K 17,376 $0.30408

Input: $1.50 / 1,000,000 token · Text output: $9 / 1,000,000 token.

提交时预扣估算费用,成功后依据上游最终账单及提交时冻结的渠道、账号价格规则结算差额。官方渠道的输入用量可能增加最终金额。生成失败退回生成预扣款。实际价格以模型卡和消费日志为准。

Google Cloud — Gemini Omni · Google Gemini API

400: invalid parameters · 401: authentication · 402: balance · 503: no compatible route / route unavailable