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

# Generate and edit videos with Omni

> Google Gemini Omni Flash and Omni 1.1 Flash video generation.

Use `gemini-omni-1.1-flash-preview` or `gemini-omni-flash-preview` under Google. Both are Preview models and return asynchronous video tasks with native audio.

## Create and retrieve

```bash theme={"dark"}
curl https://gengen.farm/v1/contents/generations/tasks \
  -H 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gemini-omni-1.1-flash-preview",
    "mode": "text_to_video",
    "prompt": "An ocean sunrise with gentle surf sounds.",
    "controls": {"duration": 5, "resolution": "720p", "ratio": "16:9"}
  }'
```

Save the returned `id`, including `omni:`, and poll the [shared task endpoint](/api-reference/google/omni-retrieve-task) with the same API key until `succeeded` or `failed`. Read `outputs.videos` on success. Each creation request creates a new task; polling never resubmits generation.

```bash theme={"dark"}
curl 'https://gengen.farm/v1/contents/generations/tasks/omni:YOUR_TASK_UUID' \
  -H 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx'
```

## Modes

| Mode | Assets | Omni Flash | Omni 1.1 Flash |
| - | - | - | - |
| `text_to_video` | None | Yes | Yes |
| `video_modify` | `sourceVideo` | Yes | Yes |
| `image_first_frame` | `firstFrameImage` | No | Yes |
| `image_first_last_frame` | `firstFrameImage`, `lastFrameImage` | No | Yes |
| `multimodal_reference` | `referenceImages`, `referenceVideos` | No | Yes |
| `video_extend` | `sourceVideo` | No | Yes |

Mode is inferred when omitted; a source video defaults to editing. Set `video_extend` explicitly to extend. Do not combine frames, references and source-video input forms. Audio input and image output are unsupported.

```json theme={"dark"}
{
  "model": "gemini-omni-1.1-flash-preview",
  "mode": "image_first_last_frame",
  "prompt": "Move smoothly from the first frame to the last frame.",
  "assets": {
    "firstFrameImage": "https://example.com/start.png",
    "lastFrameImage": "https://example.com/end.png"
  },
  "controls": {"duration": 5, "resolution": "1080p", "ratio": "16:9"}
}
```

## Limits and controls

* `prompt`: 1–10,000 characters.
* `duration`: requested duration, integer 3–10 seconds; default 5. Actual output and billable token usage may differ.
* `resolution`: Omni Flash supports `720p`. Omni 1.1 adds `360p`, `1080p` and `4k`.
* `ratio`: `16:9` or `9:16`; default `16:9`.
* One video per task. `outputCount`, if supplied, must be 1. Playground can submit several independent tasks.
* Native audio is always enabled. `generateAudio`, if supplied, must be `true`.
* Up to 10 reference images and 3 reference videos. Images accept JPEG/PNG/WebP over HTTPS (JPEG/PNG for GCS), up to 20 MiB each. Converted PNG must also fit this limit. Videos accept MP4 up to 64 MiB and 10 seconds each.

Use public/signed HTTPS URLs or account-authorized `gs://` objects. GCS access requires both caller authorization and storage read permissions; contact support to register an external object or directory. Base64, local paths and `asset://` inputs are unsupported. Media is validated before upstream generation; invalid media fails the task and releases its reservation.

## Billing and outputs

Billing combines input tokens, text/reasoning tokens and video output tokens. See [current prices](/pricing). A conservative maximum reservation covers generation; final settlement uses actual returned token usage and releases the unused reservation. A requested duration alone does not determine the final price.

Video links are temporary HTTPS URLs, retained for seven days after completion. Retrieve the task to renew a link before retention expires, or copy it to your own storage. Listing owned tasks is supported. This GENGEN endpoint does not expose cancellation, deletion, webhooks, streaming, or conversational interaction IDs.

Invalid or unsupported parameters return HTTP 400 before reservation. Insufficient balance returns 402. A task whose upstream acceptance is uncertain remains pending for reconciliation; retrieve it rather than submitting a duplicate.


## OpenAPI

````yaml openapi/omni-video.yaml POST /contents/generations/tasks
openapi: 3.1.0
info:
  title: Google Omni video API
  version: 1.0.0
servers:
  - url: https://gengen.farm/v1
security:
  - bearerAuth: []
paths:
  /contents/generations/tasks:
    post:
      summary: Create a Omni video task
      description: >
        Create an asynchronous video task. Save the returned id and use the

        [shared task query endpoint](/api-reference/google/omni-retrieve-task)

        to check status and retrieve outputs.videos. Each POST creates a new
        task.
      operationId: createOmniVideoTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OmniRequest'
            example:
              model: gemini-omni-1.1-flash-preview
              mode: text_to_video
              prompt: A cinematic ocean sunrise with gentle surf sounds.
              controls:
                duration: 4
                resolution: 720p
                ratio: '16:9'
                generateAudio: true
                outputCount: 1
      responses:
        '200':
          description: Owned asynchronous video task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OmniTask'
              example:
                id: omni:12345678-1234-4234-8234-123456789abc
                model: gemini-omni-1.1-flash-preview
                status: queued
                outputs:
                  videos: []
                  images: []
                createdAt: '2026-10-09T09:58:00.000Z'
                updatedAt: '2026-10-09T09:58:00.000Z'
        '400':
          description: Invalid or unsupported request
        '402':
          description: Insufficient balance
        '503':
          description: Video generation is temporarily unavailable
components:
  schemas:
    OmniRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          enum:
            - gemini-omni-1.1-flash-preview
            - gemini-omni-flash-preview
        mode:
          type: string
          enum:
            - text_to_video
            - image_first_frame
            - image_first_last_frame
            - multimodal_reference
            - video_extend
            - video_modify
          description: >-
            Inferred from assets when omitted; sourceVideo defaults to
            video_modify. Omni Flash supports text_to_video and video_modify;
            all modes are supported by Omni 1.1 Flash.
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
        assets:
          type: object
          additionalProperties: false
          properties:
            firstFrameImage:
              type: string
              pattern: ^(https://|gs://)
              description: >-
                HTTPS URL or account-authorized gs:// object URI. External
                private GCS objects require read access configured with GENGEN
                support.
            lastFrameImage:
              type: string
              pattern: ^(https://|gs://)
              description: >-
                HTTPS URL or account-authorized gs:// object URI. External
                private GCS objects require read access configured with GENGEN
                support.
            referenceImages:
              type: array
              minItems: 1
              maxItems: 10
              items:
                type: string
                pattern: ^(https://|gs://)
                description: >-
                  HTTPS URL or account-authorized gs:// object URI. External
                  private GCS objects require read access configured with GENGEN
                  support.
            sourceVideo:
              type: string
              pattern: ^(https://|gs://)
              description: >-
                HTTPS URL or account-authorized gs:// object URI. External
                private GCS objects require read access configured with GENGEN
                support.
            referenceVideos:
              type: array
              minItems: 1
              maxItems: 3
              items:
                type: string
                pattern: ^(https://|gs://)
                description: >-
                  HTTPS URL or account-authorized gs:// object URI. External
                  private GCS objects require read access configured with GENGEN
                  support.
          description: >-
            Choose frames, reference images/videos, or one sourceVideo for
            editing/extension. Do not mix these input forms. Images: 20 MiB; MP4
            videos: 64 MiB and at most 10 seconds each.
        controls:
          type: object
          additionalProperties: false
          properties:
            duration:
              type: integer
              minimum: 3
              maximum: 10
              default: 5
              description: >-
                Requested video duration in seconds. Final charges use returned
                token usage.
            resolution:
              type: string
              enum:
                - 360p
                - 720p
                - 1080p
                - 4k
              default: 720p
              description: >-
                Omni Flash supports 720p only; Omni 1.1 Flash supports all
                listed resolutions.
            ratio:
              type: string
              enum:
                - '16:9'
                - '9:16'
              default: '16:9'
            generateAudio:
              type: boolean
              default: true
              const: true
            outputCount:
              type: integer
              minimum: 1
              maximum: 1
              default: 1
        providerOptions:
          type: object
          additionalProperties: false
          properties:
            google:
              type: object
              additionalProperties: false
              properties: {}
    OmniTask:
      type: object
      required:
        - id
        - model
        - status
        - outputs
      properties:
        id:
          type: string
          example: omni:12345678-1234-4234-8234-123456789abc
        model:
          type: string
          enum:
            - gemini-omni-1.1-flash-preview
            - gemini-omni-flash-preview
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
        outputs:
          type: object
          required:
            - videos
            - images
          properties:
            videos:
              type: array
              items:
                type: string
                format: uri
              description: >-
                Temporary HTTPS links; empty for unfinished, failed or expired
                media.
            images:
              type: array
              maxItems: 0
              items:
                type: string
            expiresAt:
              type: string
              format: date-time
              description: Video retention deadline; seven days after completion.
            urlsExpireAt:
              type: string
              format: date-time
              description: >-
                Signed links expire within one hour. Retrieve again to renew
                before media expiry.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        failureReason:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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