> ## 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.2 Flash

> The Gemini Omni 1.2 Flash API generates 3–15 second videos at 360p to 4K from text, first and last frames, or reference images and videos, and edits existing videos up to 15 seconds long.

> [!TIP]
>
> 1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
> 2. Regardless of whether `callback_url` is provided, you can retrieve the result through the unified [Query Task Status](https://docs.poyo.ai/api-manual/task-management/status.md) endpoint.

`gemini-omni-1.2-flash` generates videos from a text prompt, first and last frames, or reference images and videos, and edits an existing video with a text instruction. Use it for product campaigns, social clips, storyboard shots, and restyling footage you already have.

## Models

* **gemini-omni-1.2-flash** - Text-to-video, first/last-frame generation, reference generation with images and videos, and video editing

## Features

* Output durations from `3` to `15` seconds in one-second steps
* Output resolutions of `360p`, `720p`, `1080p`, and `4k`, in `16:9` landscape or `9:16` portrait
* Up to `10` reference images and `3` reference videos in a single request
* Text-instructed editing of an existing video up to `15` seconds long

## Input modes

The mode is chosen from the fields you send, in this order:

* **Video editing**: Send `video_url`. Only `prompt` and `resolution` can be sent with it, and the output length follows the source video
* **Reference generation**: Send `reference_image_urls`, `reference_video_urls`, or both
* **First/last frame video**: Send one or two images in `image_urls`
* **Text to video**: Send only `prompt` and optional generation settings

## Required parameters

* **prompt**: Text prompt describing the scene, motion, style, and camera behavior, or the edit instruction when `video_url` is provided. Maximum length is `20,000` characters

## Optional parameters

* **image\_urls**: First-frame and optional last-frame image URL array. At most `2` images are allowed
* **reference\_image\_urls**: Reference image URL array. At most `10` images are allowed
* **reference\_video\_urls**: Reference video URL array. At most `3` videos are allowed, each at most `15` seconds long
* **video\_url**: Source video URL to edit. The video must be at most `15` seconds long
* **duration**: Integer from `3` to `15` seconds. Default is `8`. At most `10` when a last frame is provided. Not accepted for video editing
* **resolution**: `360p`, `720p`, `1080p`, or `4k`. Default is `720p`
* **aspect\_ratio**: `16:9` or `9:16`. Default is `16:9`. Not accepted for video editing
* **callback\_url**: Optional webhook URL for completion notifications

## Examples

### Text to Video

```json theme={"dark"}
{
  "model": "gemini-omni-1.2-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 and Last Frames

```json theme={"dark"}
{
  "model": "gemini-omni-1.2-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 and Videos

```json theme={"dark"}
{
  "model": "gemini-omni-1.2-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/motion.mp4"],
    "resolution": "720p",
    "duration": 8,
    "aspect_ratio": "16:9"
  }
}
```

### Video Editing

```json theme={"dark"}
{
  "model": "gemini-omni-1.2-flash",
  "input": {
    "prompt": "Turn the scene into a watercolor painting while keeping the camera movement",
    "video_url": "https://example.com/source.mp4",
    "resolution": "720p"
  }
}
```

## Notes

* `image_urls` cannot be combined with `reference_image_urls` or `reference_video_urls`
* `video_url` cannot be combined with `image_urls`, `reference_image_urls`, `reference_video_urls`, `duration`, or `aspect_ratio`
* Reference images and reference videos can be sent together in the same request
* Media URLs must be publicly accessible HTTP or HTTPS links
* Requests with a reference video or source video longer than `15` seconds are rejected
* The response returns a `task_id`; query task status to retrieve the generated video file


## OpenAPI

````yaml api-manual/video-series/gemini-omni-1.2-flash.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Gemini Omni 1.2 Flash API
  description: >-
    The Gemini Omni 1.2 Flash API generates 3–15 second videos at 360p to 4K
    from text, first and last frames, up to 10 reference images and 3 reference
    videos, and edits existing videos up to 15 seconds long.
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Gemini Omni 1.2 Flash
      summary: Submit Gemini Omni 1.2 Flash Task
      description: >-
        Generate a video from text, first and last frames, or reference images
        and videos, or edit an existing video
      operationId: submitGeminiOmni12FlashTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              text-to-video:
                summary: Text to video
                value:
                  model: gemini-omni-1.2-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: First and last frame video
                value:
                  model: gemini-omni-1.2-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: Reference image video
                value:
                  model: gemini-omni-1.2-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: 10
                    aspect_ratio: '9:16'
              reference-video:
                summary: Reference images and videos
                value:
                  model: gemini-omni-1.2-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/motion.mp4
                    resolution: 720p
                    duration: 8
                    aspect_ratio: '16:9'
              video-edit:
                summary: Video editing
                value:
                  model: gemini-omni-1.2-flash
                  input:
                    prompt: >-
                      Turn the scene into a watercolor painting while keeping
                      the camera movement
                    video_url: https://example.com/source.mp4
                    resolution: 720p
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid 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.2 Flash model identifier
          enum:
            - gemini-omni-1.2-flash
        callback_url:
          type: string
          format: uri
          description: Webhook callback URL for result notifications
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: >-
                Text prompt describing the video, or the edit instruction when
                `video_url` is provided. Maximum length is 20,000 characters.
              minLength: 1
              maxLength: 20000
              example: >-
                A cinematic night city with neon reflections and a slow camera
                push-in
            image_urls:
              type: array
              description: >-
                Optional first frame and last frame, in order. One or two
                publicly accessible HTTP or HTTPS image URLs. Cannot be combined
                with `reference_image_urls` or `reference_video_urls`.
              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: >-
                Optional reference images. Up to 10 publicly accessible HTTP or
                HTTPS image URLs. Can be combined with `reference_video_urls`.
              minItems: 1
              maxItems: 10
              items:
                type: string
                format: uri
              example:
                - https://example.com/reference-image.webp
            reference_video_urls:
              type: array
              description: >-
                Optional reference videos. Up to 3 publicly accessible HTTP or
                HTTPS video URLs, each at most 15 seconds long.
              minItems: 1
              maxItems: 3
              items:
                type: string
                format: uri
              example:
                - https://example.com/reference-video.mp4
              x-video-duration-seconds:
                maximum: 15
            video_url:
              type: string
              format: uri
              description: >-
                Optional source video to edit. A publicly accessible HTTP or
                HTTPS video URL, at most 15 seconds long. When provided, only
                `prompt` and `resolution` can be sent with it, and the output
                length follows the source video.
              example: https://example.com/source.mp4
              x-video-duration-seconds:
                maximum: 15
            resolution:
              type: string
              description: >-
                The resolution of the generated video. Available values are
                360p, 720p, 1080p, and 4k.
              enum:
                - 360p
                - 720p
                - 1080p
                - 4k
              default: 720p
              example: 720p
            duration:
              type: integer
              description: >-
                Output duration in seconds, from 3 to 15. Default is 8. At most
                10 when a last frame is provided. Not accepted for video
                editing.
              minimum: 3
              maximum: 15
              default: 8
              example: 8
            aspect_ratio:
              type: string
              description: >-
                The aspect ratio of the generated video. 16:9 is landscape, and
                9:16 is portrait. Not accepted for video editing.
              enum:
                - '16:9'
                - '9:16'
              default: '16:9'
              example: '16:9'
    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: >-
            Business status code. `200` means success; any other value means the
            request failed. Always check this field: some validation errors
            return HTTP 200 with `code: 400` in the body.


            - `200`: Success

            - `400`: Invalid request parameters

            - `401`: Missing or invalid API key

            - `402`: Insufficient credits

            - `403`: Permission denied

            - `404`: Resource not found

            - `408`: Request timeout

            - `429`: Rate limit exceeded

            - `500`: Internal server error

            - `502`: Upstream service error

            - `503`: Service unavailable


            See [Error Codes](/api-manual/error-codes) for details.
        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: >-
                Task status. Always `not_started` right after submission. Use
                [Query Task Status](/api-manual/task-management/status) or
                `callback_url` to get later states.


                - `not_started`: Queued, waiting to be processed

                - `running`: Being generated

                - `finished`: Completed; results are in `files` or `output`

                - `failed`: Failed; details are in `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: >-
            Business status code. `200` means success; any other value means the
            request failed. Always check this field: some validation errors
            return HTTP 200 with `code: 400` in the body.


            - `200`: Success

            - `400`: Invalid request parameters

            - `401`: Missing or invalid API key

            - `402`: Insufficient credits

            - `403`: Permission denied

            - `404`: Resource not found

            - `408`: Request timeout

            - `429`: Rate limit exceeded

            - `500`: Internal server error

            - `502`: Upstream service error

            - `503`: Service unavailable


            See [Error Codes](/api-manual/error-codes) for details.
        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: >-
        All API endpoints require Bearer Token authentication.


        Create an API key: sign in to PoYo, open **Dashboard → API Key** at
        [poyo.ai/dashboard/api-key](https://poyo.ai/dashboard/api-key), and
        click to create a key.


        Add it to the request header:


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

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