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

# Gemini Omni 1.1 Flash

> Gemini Omni 1.1 Flash API 可根据文本、一到两个关键帧、最多七张参考图片或一段 3–10 秒的参考视频，生成 360p 至 4K、时长 4–10 秒的视频。

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

`gemini-omni-1.1-flash` 可根据文本提示词、可选的首帧和尾帧、普通参考图片或一段参考视频生成视频。

## 模型

* **gemini-omni-1.1-flash** - 文生视频、首尾帧生成、参考图片生成和参考视频生成

## 输入模式

* **文生视频**：发送 `prompt` 和可选的生成设置
* **首尾帧视频**：在 `image_urls` 中发送一到两张图片
* **参考图片视频**：在 `reference_image_urls` 中发送最多七张图片
* **参考视频**：在 `reference_video_urls` 中发送一段三到十秒的视频，可同时附带最多五张参考图片

## 必填参数

* **prompt**：描述场景、运动、风格、镜头行为及其他生成指令的文本提示词

## 可选参数

* **image\_urls**：首帧和可选尾帧的图片 URL 数组。最多允许 `2` 张图片
* **reference\_image\_urls**：普通参考图片 URL 数组。最多允许 `7` 张图片；同时提供参考视频时最多 `5` 张
* **reference\_video\_urls**：参考视频 URL 数组。最多允许 `1` 段视频，时长必须在 `3` 到 `10` 秒之间（含）
* **resolution**：`360p`、`720p`、`1080p` 或 `4k`。默认为 `720p`
* **duration**：`4`、`6`、`8` 或 `10` 秒。默认为 `8`。提供参考视频时，该字段不影响输出时长
* **aspect\_ratio**：`16:9` 或 `9:16`。默认为 `16:9`
* **callback\_url**：可选的 Webhook URL，用于接收完成通知

## 示例

### 文生视频

```json theme={"dark"}
{
  "model": "gemini-omni-1.1-flash",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "prompt": "A cinematic night city with neon reflections, a slow camera push-in, and a character walking into frame",
    "resolution": "720p",
    "duration": 8,
    "aspect_ratio": "16:9"
  }
}
```

### 首尾帧

```json theme={"dark"}
{
  "model": "gemini-omni-1.1-flash",
  "input": {
    "prompt": "Create a smooth cinematic transition between the opening and closing frames",
    "image_urls": [
      "https://example.com/first-frame.webp",
      "https://example.com/last-frame.webp"
    ],
    "resolution": "1080p",
    "duration": 8,
    "aspect_ratio": "16:9"
  }
}
```

### 参考图片

```json theme={"dark"}
{
  "model": "gemini-omni-1.1-flash",
  "input": {
    "prompt": "Use the product and environment references to create a polished studio campaign video",
    "reference_image_urls": [
      "https://example.com/product.webp",
      "https://example.com/environment.webp"
    ],
    "resolution": "720p",
    "duration": 8,
    "aspect_ratio": "9:16"
  }
}
```

### 参考视频

```json theme={"dark"}
{
  "model": "gemini-omni-1.1-flash",
  "input": {
    "prompt": "Follow the motion of the reference video while applying the visual style of the image",
    "reference_image_urls": ["https://example.com/style.webp"],
    "reference_video_urls": ["https://example.com/reference.mp4"],
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }
}
```

## 注意事项

* `image_urls` 不能与 `reference_image_urls` 或 `reference_video_urls` 同时使用
* 请使用公开的 HTTPS 媒体 URL，或在提交前通过 Playground 上传文件
* 响应会返回 `task_id`；查询任务状态即可获取生成的视频文件


## OpenAPI

````yaml zh/api-manual/video-series/gemini-omni-1.1-flash.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Gemini Omni 1.1 Flash API
  description: >-
    Gemini Omni 1.1 Flash API 可根据文本、一到两张关键帧、最多七张参考图像或一个 3–10 秒的参考视频，生成 4–10
    秒、360p 到 4K 的视频。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Gemini Omni 1.1 Flash
      summary: 提交 Gemini Omni 1.1 Flash 任务
      description: 根据文本、关键帧、参考图像或参考视频生成视频
      operationId: submitGeminiOmni11FlashTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              text-to-video:
                summary: 文生视频
                value:
                  model: gemini-omni-1.1-flash
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A cinematic night city with neon reflections and a slow
                      camera push-in
                    resolution: 720p
                    duration: 8
                    aspect_ratio: '16:9'
              first-last-frame:
                summary: 首尾帧视频
                value:
                  model: gemini-omni-1.1-flash
                  input:
                    prompt: >-
                      Create a smooth cinematic transition between the two
                      frames
                    image_urls:
                      - https://example.com/first-frame.webp
                      - https://example.com/last-frame.webp
                    resolution: 1080p
                    duration: 8
                    aspect_ratio: '16:9'
              reference-images:
                summary: 参考图像视频
                value:
                  model: gemini-omni-1.1-flash
                  input:
                    prompt: >-
                      Use the references to create a polished product campaign
                      video
                    reference_image_urls:
                      - https://example.com/product.webp
                      - https://example.com/environment.webp
                    resolution: 720p
                    duration: 8
                    aspect_ratio: '9:16'
              reference-video:
                summary: 参考视频生成
                value:
                  model: gemini-omni-1.1-flash
                  input:
                    prompt: >-
                      Follow the reference motion while applying the supplied
                      visual style
                    reference_image_urls:
                      - https://example.com/style.webp
                    reference_video_urls:
                      - https://example.com/reference.mp4
                    resolution: 720p
                    aspect_ratio: '16:9'
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权：API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: Gemini Omni 1.1 Flash 模型标识
          enum:
            - gemini-omni-1.1-flash
        callback_url:
          type: string
          format: uri
          description: 接收结果通知的 Webhook 回调 URL
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: 视频生成的文本提示词。最大长度为 20,000 个字符。
              minLength: 1
              maxLength: 20000
              example: >-
                A cinematic night city with neon reflections and a slow camera
                push-in
            image_urls:
              type: array
              description: 可选的首帧和尾帧图像。最多支持两张图像。
              minItems: 1
              maxItems: 2
              items:
                type: string
                format: uri
              example:
                - https://example.com/first-frame.webp
                - https://example.com/last-frame.webp
            reference_image_urls:
              type: array
              description: 可选的参考图像。最多支持七张图像；提供参考视频时最多五张。
              minItems: 1
              maxItems: 7
              items:
                type: string
                format: uri
              example:
                - https://example.com/reference-image.webp
            reference_video_urls:
              type: array
              description: 可选的参考视频。最多支持一个视频，时长为 3 到 10 秒（含）。
              minItems: 1
              maxItems: 1
              items:
                type: string
                format: uri
              example:
                - https://example.com/reference-video.mp4
              x-video-duration-seconds:
                minimum: 3
                maximum: 10
            resolution:
              type: string
              description: 生成视频的分辨率。可选值为 360p、720p、1080p 和 4k。
              enum:
                - 360p
                - 720p
                - 1080p
                - 4k
              default: 720p
              example: 720p
            duration:
              type: integer
              description: 输出时长（秒）。默认为 8。此字段不影响参考视频生成。
              enum:
                - 4
                - 6
                - 8
                - 10
              default: 8
              example: 8
            aspect_ratio:
              type: string
              description: 生成视频的宽高比。16:9 为横屏，9:16 为竖屏。
              enum:
                - '16:9'
                - '9:16'
              default: '16:9'
              example: '16:9'
          allOf:
            - not:
                required:
                  - image_urls
                  - reference_image_urls
            - not:
                required:
                  - image_urls
                  - reference_video_urls
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        message:
          type: string
          example: success
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              description: >-
                任务状态。提交后立即返回时始终为
                `not_started`。后续状态请通过[查询任务状态](/zh/api-manual/task-management/status)接口或
                `callback_url` 获取。


                - `not_started`：排队中，等待处理

                - `running`：生成中

                - `finished`：已完成，结果在 `files` 或 `output` 中

                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

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