Gemini Omni 完整解析(Markdown)

返回模型解析页

Gemini Omni API 模型解析指南

快速结论

  • 定位偏 Flash,优先满足快速生成、低延迟反馈和高频迭代场景。
  • 适合概念验证、社媒短视频和批量出片,不必一开始就走重制作流程。
  • 使用异步视频任务接口,先提交任务,再通过状态接口轮询结果。

核心能力

  • Low-latency output:Built for workflows that need fast feedback and frequent prompt changes.
  • Short-form batch generation:Fits short videos, multi-variant testing, and social creative production.
  • Unified video task contract:Reuses the shared ToAPIs video task interface for easier production handoff.

适用场景

  • When validating concepts, scripts, or motion directions quickly.
  • When producing social short-form video or multiple creative variants at scale.
  • When low-latency feedback is important for rapid prompt iteration.

不适用场景

  • When polished showcase quality and maximum visual stability matter more than speed.
  • When you require synchronous immediate responses instead of async task workflows.

运行特性

  • Runs as an async video task flow, returning task state first rather than the final video file.
  • Best suited to short durations, quick feedback cycles, and repeated parameter tuning.
  • Fits server-side queues and production workflows via shared video-task polling patterns.

最小请求示例

{
  "model": "gemini_omni",
  "prompt": "A cinematic shot of a cat running through neon rain",
  "aspect_ratio": "16:9",
  "duration": 6,
  "resolution": "720P"
}

最小响应示例

{
  "id": "video_01JZEXAMPLE",
  "object": "generation.task",
  "model": "gemini_omni",
  "status": "queued",
  "created_at": 1779247407
}

关键参数

参数类型必填默认值范围说明
modelstringgemini_omni-Model identifier. Use the fixed value gemini_omni.
promptstring--Main instruction describing the subject, action, scene, and visual style.
aspect_ratiostring16:916:99:16
durationinteger6610
resolutionstring720P720POutput resolution. Currently only 720P is supported; if omitted, the default value is used.

常见错误

HTTPCode触发条件修复建议重试策略
400invalid_request_errorRequest payload misses required fields or has invalid field types.Validate model, mode, and input schema before request.Retry only after fixing payload; avoid blind retries.
401authentication_errorMissing Authorization header or invalid API key.Verify Bearer token format and API key scope.Retry after auth fix; rotate key if repeated failures continue.
429rate_limit_exceededRequest rate, concurrency, or current quota hits upstream rate limiting.Apply exponential backoff first, then review request rate, concurrency, and quota usage.Use exponential backoff (e.g., 1s/2s/4s) with jitter; if it persists, reduce submission pressure.
500internal_errorTransient upstream error or internal processing failure.Capture request id and trigger retry workflow.Retry 2-3 times with short delays; escalate if persistent.

FAQ

  1. Gemini Omni 更适合什么场景?
    更适合概念验证、社媒短视频、批量出片和需要低延迟反馈的高频创意迭代场景。
  2. 图像视频模型报错:invalid apitype: -1
    这类错误通常说明接口走错了。图像和视频模型一般不走 chat 接口,而是按对应文档发起 HTTP 任务请求,并通过任务状态接口轮询结果。排查时建议先看用户的实际请求代码、请求地址和请求体。
  3. 用户进行生成图片/视频的任务时出现任务失败,但是扣款
    先让用户提供任务日志或截图,重点看是否出现了输入或输出 token 统计。如果有这类 token 记录,大概率是用户把图片/视频模型走成了 chat 接口;这不是正确用法。图片和视频模型通常是异步任务接口,需要通过 HTTP 请求先提交任务,再拿到任务 ID 轮询状态,详细以对应文档为准。

相关 API