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

# gemini-omni-1.2-flash

> API usage guide for gemini-omni-1.2-flash.

**Model ID**

```bash theme={null}
gemini-omni-1.2-flash
```

**Calling method:** async

# Gemini Omni 1.2 Flash API Usage Guide

## Overview

**Gemini Omni 1.2 Flash** is Google's fast, cost-effective video model for generation and editing, built for high-volume work such as product and catalog clips, virtual try-ons, ad variations and creative applications. It turns a text prompt, optionally with reference images or input videos, into video with generated audio at 360p, 720p, 1080p or 4K, in 16:9 or 9:16.

What's new in 1.2:

* **Longer clips**: text-to-video and image-to-video up to 15 seconds, and edits of source videos up to 15 seconds (up from 10).
* **Upscaling**: draft quickly at 360p or 720p, then upscale the clips you keep to 1080p or 4K.
* **Lower price**: \$0.07 per second of 720p video, 30% less than Gemini Omni 1.1 Flash.
* **Consistent results**: stronger adherence to image and video references keeps characters, products and brand details consistent across shots.

All generated videos carry an invisible **SynthID** watermark and **C2PA** content credentials.

## Authentication

Include your API key in the Authorization header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Submit a request

### Endpoint

```
POST https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests
```

### Text to video (15 seconds)

```bash theme={null}
curl -X POST "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-1.2-flash",
    "payload": {
      "prompt": "A 3D animated bioluminescent space-fish glides over the red canyons of Mars, cinematic volumetric lighting",
      "task": "text_to_video",
      "durationSeconds": 15,
      "aspectRatio": "16:9",
      "resolution": "720p"
    }
  }'
```

### Image to video

```json theme={null}
{
  "model": "gemini-omni-1.2-flash",
  "payload": {
    "prompt": "The suitcase unzips and splits open; white retro text reading 'Omnicase' pops out of the center",
    "reference_image": ["https://example.com/suitcase.png"],
    "task": "image_to_video",
    "durationSeconds": 15,
    "aspectRatio": "16:9",
    "resolution": "720p"
  }
}
```

### Edit a video

```json theme={null}
{
  "model": "gemini-omni-1.2-flash",
  "payload": {
    "prompt": "Change the dog to the cat from the reference image. Remove the backpack and add a propeller hat.",
    "video": ["https://example.com/office-dog.mp4"],
    "reference_image": ["https://example.com/cat.png"],
    "task": "edit",
    "resolution": "720p"
  }
}
```

Leave `durationSeconds` and `aspectRatio` at `auto` (or omit them): the edited video follows the source clip.

### Upscale a video

```json theme={null}
{
  "model": "gemini-omni-1.2-flash",
  "payload": {
    "video": ["https://example.com/draft-720p.mp4"],
    "task": "upscale",
    "resolution": "4k"
  }
}
```

`resolution` is the target and must be above the source: 360p to 720p or 1080p, 720p to 1080p or 4K, 1080p to 4K. No prompt is needed.

### Request parameters

Parameter names match our Veo video models, so a single integration works across both.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `prompt` | string | Yes, except for `upscale` | Text description of the video to generate, or of the edit to make. |
| `reference_image` | string/array | No | Up to 5 image URLs. With `image_to_video`, one image is the starting frame; two images run first-and-last-frame interpolation (first is start, second is end). |
| `video` | string/array | No | Up to 3 MP4 URLs, each up to 15 seconds. Used by `edit`, `upscale`, `extend` and `reference_to_video`. |
| `task` | enum | No | `auto` (default), `text_to_video`, `image_to_video`, `reference_to_video`, `edit`, `extend` or `upscale`. `auto` lets the model infer the task from the inputs; `reference_to_video`, `extend` and `upscale` must be requested explicitly. |
| `durationSeconds` | integer / `"auto"` | No | 3-15 seconds, or `auto` (default) to let the model decide. 15 seconds is available for text-to-video and image-to-video; interpolation and reference-to-video go up to 10. Use `auto` with a `video` input: the output follows the source clip. |
| `aspectRatio` | enum | No | `auto` (default), `16:9` or `9:16`. With a `video` input, `auto` follows the source clip. |
| `resolution` | enum | No | `360p`, `720p` (default), `1080p` or `4k`. For `upscale`, the target resolution. |

## Check status

```bash theme={null}
curl "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests/{request_id}" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

On success, `outcome.media_urls[0].url` is the generated video (MP4), with `thumbnail_image_url` alongside. To edit or upscale a result, pass that URL as `video`.

## Pricing

| Resolution | Per second of output video |
| - | - |
| 360p | \$0.02 |
| 720p | \$0.07 |
| 1080p | \$0.10 |
| 4K | \$0.21 |

* The rate is the same with or without audio and for either aspect ratio.
* Upscaling is billed at the target resolution's rate for the length of the source video.
* Input references (text, images, video) are billed at $1.50 per 1M tokens; an image is 1,120 tokens. Text and reasoning tokens the model produces are billed at $9.00 per 1M tokens.
* The requested duration is held when you submit (15 seconds when duration is `auto`), and the charge is settled to the actual length of the video once it is generated.

## Capabilities & limits

* Duration: 3-15 seconds for text-to-video and image-to-video; up to 10 seconds for first-and-last-frame interpolation and reference-to-video.
* Input video: up to 3 videos, each up to 15 seconds. For upscale: 360p, 720p or 1080p source in 16:9 or 9:16.
* Reference images: up to 5.
* Aspect ratio: 16:9 or 9:16. Resolution: 360p, 720p, 1080p or 4K.


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