> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini Omni 1.2 Flash 文生视频

> Gemini Omni 1.2 Flash 文生视频 API 将提示词生成为 3–15 秒的视频，分辨率可选 360p、720p、1080p 或 4K，宽高比 16:9 或 9:16。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口获取结果。

Gemini Omni 1.2 Flash 文生视频根据文本提示词生成 3–15 秒的视频。`360p` 适合快速、低成本的草稿，`720p`、`1080p` 和 `4k` 适合成片，支持横屏和竖屏。

Gemini Omni 1.2 Flash 属于 Google 的 Gemini Omni 视频模型系列。Vidgo 提供四个模型 ID：[文生视频](https://docs.vidgo.ai/zh/api-manual/video-series/google-gemini-omni-1-2-flash-text-to-video.md)、[图生视频](https://docs.vidgo.ai/zh/api-manual/video-series/google-gemini-omni-1-2-flash-image-to-video.md)、[参考生视频](https://docs.vidgo.ai/zh/api-manual/video-series/google-gemini-omni-1-2-flash-reference-to-video.md)和[视频编辑](https://docs.vidgo.ai/zh/api-manual/video-series/google-gemini-omni-1-2-flash-video-edit.md)。

## 模型

* **google/gemini-omni-1.2-flash/text-to-video** — Gemini Omni 1.2 Flash 文生视频，3–15 秒，360p 至 4K。

## 功能

* 提示词最多 20,000 个字符。
* 时长可选 3 到 15 秒之间的任意整数秒。
* 四档分辨率：`360p`、`720p`、`1080p`、`4k`。
* 横屏（`16:9`）或竖屏（`9:16`）。

## 必填参数

* `prompt` (string)：场景描述，去除首尾空白后 1–20,000 个字符。

## 可选参数

* `duration` (integer)：输出时长，`3`–`15` 秒。默认 `8`。
* `resolution` (string)：`360p`、`720p`、`1080p` 或 `4k`。默认 `720p`。
* `aspect_ratio` (string)：`16:9` 或 `9:16`。默认 `16:9`。

## 分辨率

| `resolution` | 典型用途 |
| - | - |
| `360p` | 快速、低成本测试提示词 |
| `720p` | 默认；社媒短片和草稿 |
| `1080p` | 全高清交付 |
| `4k` | 最高细节，用于最终成片 |

## 输出

任务完成后，[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口和回调内容的 `files` 数组中返回一个 MP4 视频。

## 示例

* **海洋纪录片**：一只海獭漂浮在金色海藻间敲击贝壳，5 秒，`1080p`，`16:9` ([结果](https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.2-flash/text-to-video/v1/01/output.mp4))。
* **竖屏工坊镜头**：吹玻璃匠人在炉火映照的工坊里转动发光的琥珀色玻璃球，5 秒，`720p`，`9:16` ([结果](https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.2-flash/text-to-video/v1/02/output.mp4))。

## 注意事项

* 空字符串和空数组视为未提供，使用默认值。
* `model` 和 `callback_url` 放在请求根级，与 `input` 并列。`input` 接收上文列出的字段，其他字段返回 400。
* 积分在提交时预扣，等于输出 `duration` 乘以所选 `resolution` 的每秒费率。任务失败全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。


## OpenAPI

````yaml zh/api-manual/video-series/google-gemini-omni-1-2-flash-text-to-video.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Gemini Omni 1.2 Flash 文生视频
  description: >-
    Gemini Omni 1.2 Flash 文生视频 API 将提示词生成为 3–15 秒的视频，分辨率可选 360p、720p、1080p 或
    4K，宽高比 16:9 或 9:16。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境服务器
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Gemini Omni 1.2 Flash Text to Video
      summary: 提交 Gemini Omni 1.2 Flash 文生视频 任务
      operationId: submitGeminiOmni12FlashTextToVideoTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              landscape-1080p:
                summary: 横屏 1080p 场景
                value:
                  model: google/gemini-omni-1.2-flash/text-to-video
                  input:
                    prompt: >-
                      Sunlit marine documentary shot off a calm turquoise rocky
                      cove: a wild sea otter floats leisurely on its back amid
                      gently swaying golden kelp ribbons, tapping a small clam
                      shell against a flat stone on its chest while clear
                      ripples scatter bright afternoon sunlight across its wet
                      fur. Smooth floating camera at water level, natural fluid
                      physics, crisp 1080p detail. Audio: gentle lapping coastal
                      water and soft shell taps. No text, no logos, no
                      watermarks.
                    duration: 5
                    resolution: 1080p
                    aspect_ratio: '16:9'
              portrait-720p:
                summary: 竖屏 720p 场景
                value:
                  model: google/gemini-omni-1.2-flash/text-to-video
                  input:
                    prompt: >-
                      Vertical cinematic documentary shot inside a dim artisan
                      glassblowing studio: a craftsperson steadily rotates a
                      glowing molten amber glass orb at the tip of a steel
                      blowpipe while shaping it with damp cherrywood blocks.
                      Wisps of steam curl upward and warm furnace light shimmers
                      across textured brick walls. Steady medium close-up,
                      realistic incandescent glow. Audio: low furnace roar and
                      gentle hiss of steam. No logos, no readable text, no
                      watermarks.
                    duration: 5
                    resolution: 720p
                    aspect_ratio: '9:16'
      responses:
        '200':
          description: 任务提交结果。任务 ID 标识一项异步任务；生成可能仍在进行中。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          example: google/gemini-omni-1.2-flash/text-to-video
        callback_url:
          type: string
          format: uri
          description: 可选的 Webhook URL，用于接收完成或失败通知。
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          additionalProperties: false
          properties:
            prompt:
              type: string
              minLength: 1
              maxLength: 20000
              description: 场景描述：主体、动作、运镜、光线和声音提示。去除首尾空白后 1–20,000 个字符。
            duration:
              type: integer
              minimum: 3
              maximum: 15
              default: 8
              description: 输出时长，3–15 的整数秒。
            resolution:
              type: string
              enum:
                - 360p
                - 720p
                - 1080p
                - 4k
              default: 720p
              description: 输出分辨率：`360p` 适合快速草稿，`720p`、`1080p` 或 `4k` 适合成片。
            aspect_ratio:
              type: string
              enum:
                - '16:9'
                - '9:16'
              default: '16:9'
              description: 输出宽高比：横屏 `16:9` 或竖屏 `9:16`。
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: WQP14VSIQH4BAZCP
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-25T11:17:26'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: 错误信息。参见[错误码](/zh/api-manual/error-codes)。
          example: prompt is required
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '使用 `Authorization: Bearer VIDGO_API_KEY`。'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.