快速结论

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

关键参数

  • model | string | 必填 | gemini_omni | - | Model identifier. Use the fixed value `gemini_omni`.
  • prompt | string | 必填 | - | - | Main instruction describing the subject, action, scene, and visual style.
  • aspect_ratio | string | 可选 | 16:9 | 16:9 | 9:16 | Video aspect ratio. Defaults to `16:9`, corresponding to landscape or portrait output.
  • duration | integer | 可选 | 6 | 6 | 10 | Output duration in seconds. Defaults to `6` and currently supports only `6` and `10`.
  • resolution | string | 可选 | 720P | 720P | Output resolution. Currently only `720P` is supported; if omitted, the default value is used.

常见错误

  • 400 invalid_request_error: 触发=Request 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.
  • 401 authentication_error: 触发=Missing Authorization header or invalid API key.; 修复=Verify Bearer token format and API key scope.; 重试=Retry after auth fix; rotate key if repeated failures continue.
  • 429 rate_limit_exceeded: 触发=Request 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.
  • 500 internal_error: 触发=Transient upstream error or internal processing failure.; 修复=Capture request id and trigger retry workflow.; 重试=Retry 2-3 times with short delays; escalate if persistent.

模型解析页

Gemini Omni

Gemini Omni 是偏快速出片与低延迟反馈的视频模型,适合概念验证、社媒短视频、批量生成和高频提示词迭代。页面内容按 ToAPIs 的通用视频任务契约组织,方便先验证流程再迁移到生产调用。

厂商

Google

能力

Video

价格

Pay-as-you-go pricing

更新

-

模型概览

快速结论

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

Gemini Omni模型特点

核心能力

能力一览与工程实践价值

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.

如何使用 Gemini Omni API

  1. Set Authorization: Bearer <YOUR_API_KEY>.
  2. Submit a task with model, prompt, aspect_ratio, duration, and resolution.
  3. Capture the returned task_id and poll the video task status endpoint.
  4. Refine prompt, aspect ratio, duration, and other parameters based on output quality.

关键参数

参数类型必填默认值取值范围说明
modelstringgemini_omni-Model identifier. Use the fixed value `gemini_omni`.
promptstring--Main instruction describing the subject, action, scene, and visual style.
aspect_ratiostring16:916:9 | 9:16Video aspect ratio. Defaults to `16:9`, corresponding to landscape or portrait output.
durationinteger66 | 10Output duration in seconds. Defaults to `6` and currently supports only `6` and `10`.
resolutionstring720P720POutput resolution. Currently only `720P` is supported; if omitted, the default value is used.

常见错误

400 invalid_request_error

触发条件: Request 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.

401 authentication_error

触发条件: Missing Authorization header or invalid API key.

修复建议: Verify Bearer token format and API key scope.

重试策略: Retry after auth fix; rotate key if repeated failures continue.

429 rate_limit_exceeded

触发条件: Request 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.

500 internal_error

触发条件: Transient upstream error or internal processing failure.

修复建议: Capture request id and trigger retry workflow.

重试策略: Retry 2-3 times with short delays; escalate if persistent.

FAQ

Gemini Omni 更适合什么场景?

更适合概念验证、社媒短视频、批量出片和需要低延迟反馈的高频创意迭代场景。

图像视频模型报错:invalid apitype: -1

这类错误通常说明接口走错了。图像和视频模型一般不走 chat 接口,而是按对应文档发起 HTTP 任务请求,并通过任务状态接口轮询结果。排查时建议先看用户的实际请求代码、请求地址和请求体。

用户进行生成图片/视频的任务时出现任务失败,但是扣款

先让用户提供任务日志或截图,重点看是否出现了输入或输出 token 统计。如果有这类 token 记录,大概率是用户把图片/视频模型走成了 chat 接口;这不是正确用法。图片和视频模型通常是异步任务接口,需要通过 HTTP 请求先提交任务,再拿到任务 ID 轮询状态,详细以对应文档为准。

模式说明

Text to Video 模式(Gemini Omni)

Generate video directly from prompts for fast script validation and short-form prototyping.

模式参数

modelpromptaspect_ratiodurationresolution

最佳应用场景

  • Concept validation
  • Script previs
  • Social short-form prototyping

相关 API

準備好開始了嗎?

免費註冊,立即體驗企業级 AI API 網關的強大功能