> ## 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 按文字指令编辑最长 15 秒的源视频，输出 360p 至 4K。

> [!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 视频编辑根据文字指令修改最长 15 秒的现有视频，如更换光线、天气、风格或物体，同时保留源视频的动作和构图。输出分辨率从 `360p` 到 `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/video-edit** — Gemini Omni 1.2 Flash 视频编辑，源视频最长 15 秒，360p 至 4K。

## 功能

* 三个字段：`prompt`、`video_url` 和 `resolution`。
* 输出时长和构图跟随源视频。
* 四档分辨率：`360p`、`720p`、`1080p`、`4k`。

## 必填参数

* `prompt` (string)：编辑指令，去除首尾空白后 1–20,000 个字符。
* `video_url` (string)：源视频的公开 HTTP(S) URL，最长 15 秒、最大 100 MB。

## 可选参数

* `resolution` (string)：`360p`、`720p`、`1080p` 或 `4k`。默认 `720p`。

## 时长

编辑后的视频与源视频时长相同。

## 输出

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

## 示例

* **重新布光**：把正午明亮的海湾改为玫瑰金色的日落，海獭的动作和构图保持不变，`720p` ([结果](https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.2-flash/video-edit/v1/01/output.mp4))。

## 注意事项

* 源视频在提交时下载并测量时长；最长 15 秒，须包含视频轨。
* 该模型 ID 的 `input` 接收 `prompt`、`video_url` 和 `resolution`，其他字段返回 400。`model` 和 `callback_url` 放在请求根级。
* 积分在提交时预扣，等于源视频时长（向上取整到秒）乘以所选 `resolution` 的每秒费率。任务失败全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。


## OpenAPI

````yaml zh/api-manual/video-series/google-gemini-omni-1-2-flash-video-edit.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 按文字指令编辑最长 15 秒的源视频，输出 360p 至 4K。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境服务器
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Gemini Omni 1.2 Flash Video Edit
      summary: 提交 Gemini Omni 1.2 Flash 视频编辑 任务
      operationId: submitGeminiOmni12FlashVideoEditTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              relight:
                summary: 重新布光
                value:
                  model: google/gemini-omni-1.2-flash/video-edit
                  input:
                    prompt: >-
                      Relight the bright midday turquoise cove into a glowing
                      rose-gold sunset with warm amber and violet reflections
                      shimmering across the gentle water ripples and soft golden
                      rim light catching the sea otter's wet fur. Preserve the
                      floating sea otter's exact motion, shell tapping, kelp
                      movement, and camera framing. No text, no logos, no
                      watermarks.
                    video_url: >-
                      https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.2-flash/text-to-video/v1/01/output.mp4
                    resolution: 720p
      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/video-edit
        callback_url:
          type: string
          format: uri
          description: 可选的 Webhook URL，用于接收完成或失败通知。
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
            - video_url
          additionalProperties: false
          properties:
            prompt:
              type: string
              minLength: 1
              maxLength: 20000
              description: 编辑指令，如更改光线、风格或物体。去除首尾空白后 1–20,000 个字符。
            video_url:
              type: string
              format: uri
              description: 要编辑的源视频：公开可访问的 HTTP(S) URL，最长 15 秒、最大 100 MB（MP4、MOV 或 WebM）。
            resolution:
              type: string
              enum:
                - 360p
                - 720p
                - 1080p
                - 4k
              default: 720p
              description: 输出分辨率：`360p` 适合快速草稿，`720p`、`1080p` 或 `4k` 适合成片。
    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: WLWLZZOY6LLZ5ZC4
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-25T11:19:12'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: 错误信息。参见[错误码](/zh/api-manual/error-codes)。
          example: video_url is required for video-edit
  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.