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

# Gemini Omni 1.2 Flash API: Video from $0.10

> Call Google's Gemini Omni 1.2 Flash through the OpenAI-style /v1/videos endpoint: text-to-video, image-to-video, and reference images, with no Google account.

Gemini Omni 1.2 Flash is Google's video generation model: every clip has its own audio track, characters speak the lines you write in the prompt, and output goes up to 1080p. LaoZhang API charges per video, \$0.10 at 360p, \$0.30 at 720p, and \$0.45 at 1080p, for any length from 3 to 10 seconds.

| Item | Details |
| - | - |
| Model ID | `gemini-omni-1.2-flash` |
| Create a task | `POST /v1/videos`, JSON or multipart |
| Get a task | `GET /v1/videos/{id}`; read `video_url` when it completes |
| Download | Use `video_url` directly, or `GET /v1/videos/{id}/content` |
| Token group | `default`, with the Usage first billing mode |
| Price | Per video, set by resolution only; see [Pricing](#pricing) |
| Output | 3–10 seconds at 360p, 720p, or 1080p; 16:9 or 9:16; 24 fps with an audio track |
| Image input | Up to 6 images; see [Generate a video from an image](#generate-a-video-from-an-image) and [Generate from reference images](#generate-from-reference-images) |
| Retention | Video links stay available for 7 days |
| Route | Integrated independently and priced per clip; no Google account needed |

<video controls preload="none" poster="/images/samples/gemini-omni-en-t2v.jpg" src="https://media.laozhang.ai/samples/video/gemini-omni-en-t2v-720p-10s.mp4" />

Output of the text-to-video example below: gemini-omni-1.2-flash, 720p, 10 seconds, 16:9. The character speaks the line written in the prompt

## Pricing and model choice

### Pricing

Gemini Omni 1.2 Flash is billed per video, and `resolution` alone sets the price:

| `resolution` | Landscape / portrait output | Per video |
| - | - | -: |
| `360p` | 640×360 / 360×640 | \$0.10 |
| `720p` (default) | 1280×720 / 720×1280 | \$0.30 |
| `1080p` | 1920×1080 / 1080×1920 | \$0.45 |

What does not change the price:

* `seconds`: any length from 3 to 10 seconds costs the same, so a 10-second 720p clip works out to \$0.03 per second.
* Images: a first frame or reference images cost nothing extra.
* `reasoning_effort` and the aspect ratio.

How charges work:

* You are charged when the task is created, and failed tasks are refunded in full, including tasks blocked by content moderation.
* Requests rejected at submission with a parameter error are not charged.
* Each resubmission creates a new task and is charged again, so keep a mapping between your own job ID and the task `id`.

The [usage log](https://api.laozhang.ai/log) shows the actual charge for every task.

**A 10-second clip costs about 43% of Google's list price.** Google's Gemini API bills video output per second. The table puts Google's list price for a 10-second clip next to LaoZhang API's (checked November 11, 2026; the source is under [Related docs and sources](#related-docs-and-sources)):

| 10-second clip | Google list price | LaoZhang API |
| - | -: | -: |
| 360p | \$0.23 | \$0.10 |
| 720p | \$0.70 | \$0.30 |
| 1080p | \$1.04 | \$0.45 |

### Choose between video models

As of November 11, 2026, Gemini Omni 1.2 Flash has the lowest price on LaoZhang API for a 10-second 1080p clip (\$0.45). At \$0.10 per clip, 360p is a cheap way to try prompts in bulk.

* **Characters that speak lines, or 1080p output**: use Gemini Omni 1.2 Flash.
* **One continuous clip of 20–60 seconds, continuing an existing video, or ratios such as 1:1 and 4:3**: use [Muse](https://docs.laozhang.ai/en/api-capabilities/muse-video-generation.md). It shares the `/v1/videos` endpoint, so the same token works and you only change the model.
* **2K, reference video, or reference audio**: use [MiniMax H3](https://docs.laozhang.ai/en/api-capabilities/minimax-h3-video-generation.md).

The [video generation API comparison](https://docs.laozhang.ai/en/api-capabilities/video-generation-guide.md) lists what a 5- or 10-second clip costs on each model and which endpoint it uses.

## Sample outputs

These clips are unedited Gemini Omni 1.2 Flash output with the audio track the model generated. Click a clip to play it. Each caption lists the resolution, length, aspect ratio, and prompt.

The [Muse sample outputs](https://docs.laozhang.ai/en/api-capabilities/muse-video-generation.md#sample-outputs) and the [MiniMax H3 sample outputs](https://docs.laozhang.ai/en/api-capabilities/minimax-h3-video-generation.md#sample-outputs) use the same prompts, so you can compare the models scene by scene.

<video controls preload="none" poster="/images/samples/gemini-omni-sample-fox-720p-5s.jpg" src="https://media.laozhang.ai/samples/video/gemini-omni-fox-720p-5s.mp4" />

720p, 5 seconds, 16:9. Prompt: A red fox walking through snowy forest at sunrise, cinematic

<video controls preload="none" poster="/images/samples/gemini-omni-sample-paper-boat-720p-10s.jpg" src="https://media.laozhang.ai/samples/video/gemini-omni-paper-boat-720p-10s.mp4" />

720p, 10 seconds, 16:9. Prompt: A paper boat drifts down a rainy city gutter, then sails into a small sunny pond

<video controls preload="none" poster="/images/samples/gemini-omni-sample-hot-air-balloon-1080p-10s.jpg" src="https://media.laozhang.ai/samples/video/gemini-omni-hot-air-balloon-1080p-10s.mp4" />

1080p, 10 seconds, 16:9. Prompt: A hot air balloon rises over a valley at dawn, drifts over a river and a village, then lands in a meadow

<video controls preload="none" poster="/images/samples/gemini-omni-sample-cyclist-1080p-10s-9x16.jpg" src="https://media.laozhang.ai/samples/video/gemini-omni-cyclist-1080p-10s-9x16.mp4" />

1080p, 10 seconds, 9:16 portrait. Prompt: A cyclist rides through a coastal town from morning to sunset: market, harbor, cliff road, lighthouse

## Before you start

### Create a token

Add a token in [Token management](https://api.laozhang.ai/token) with these settings:

| Setting | Choice |
| - | - |
| Group | `default` |
| Billing mode | Usage first (recommended) or Per-call; a Usage-based-only token cannot call it |
| Tip | Use a separate token for video so you can match charges to tasks in the usage log |

You do not need a Google account, a Gemini API key, or a dedicated video group. A token you already use for [Muse](https://docs.laozhang.ai/en/api-capabilities/muse-video-generation.md) works as it is.

### How it works

**1. Create a task**

Call `POST /v1/videos` with at least `model` and `prompt`. The endpoint is asynchronous: it returns a task `id` within seconds instead of waiting for the video. Save it.

**2. Poll the status**

Call `GET /v1/videos/{id}` every 5–10 seconds and read `status`. Short 360p clips usually finish in 30–60 seconds, a 10-second 720p clip takes about 1 minute, and a 10-second 1080p clip about 1.5–2 minutes.

**3. Download the result**

When `status` is `completed`, download the MP4 from `video_url`. The download needs no `Authorization` header.

> [!WARNING]
>
> **Keep polling for up to 15 minutes, and do not resubmit while the task is still running.**
>
> * Submitting and polling both return immediately, so you do not need a longer HTTP timeout.
> * Keep checking while `status` is `queued` or `in_progress`.
> * If you stop polling, check the same `id` again later. Resubmitting creates a new task and charges again.
> * A task still unfinished after 30 minutes is marked failed and refunded in full.

### Set up

The cURL examples use `jq` to read fields from responses (`brew install jq` on macOS). Set your key and base URL first:

```bash theme={null}
export LAOZHANG_API_KEY="your LaoZhang API key"
export BASE_URL="https://api.laozhang.ai"
```

## Generate videos

### Generate a video from text

```bash theme={null}
curl -s -X POST "$BASE_URL/v1/videos" \
  -H "Authorization: Bearer $LAOZHANG_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
    "model": "gemini-omni-1.2-flash",
    "prompt": "A street musician plays the violin under a street lamp on a rain-soaked cobblestone street at dusk. The camera slowly pushes in. She stops, smiles at the camera and says: \"This one is for you.\" Soft rain and violin in the background.",
    "resolution": "720p",
    "seconds": "10",
    "aspect_ratio": "16:9"
  }' | tee omni-create.json

export VIDEO_ID=$(jq -r '.id' omni-create.json)
```

A successful request returns a queued task:

```json theme={null}
{
  "id": "task_pmz6yURlFEdpV7oQREUQWFMvYe0ZNN0j",
  "object": "video",
  "model": "gemini-omni-1.2-flash",
  "status": "queued",
  "progress": 0,
  "resolution": "720p",
  "seconds": "10",
  "created_at": 1794395489
}
```

All three optional fields have defaults:

* `resolution`: `720p` when left out. To check a prompt first, send `360p` at \$0.10 per clip.
* `seconds`: a whole number from 3 to 10; 10 when left out.
* `aspect_ratio`: `16:9` or `9:16`; `16:9` when left out.

### Make characters speak dialogue

Write the line directly in `prompt`, put it in quotation marks, and say who speaks it. The character in the clip then says it aloud. Lines in English, Chinese, Japanese, Korean, and Russian all work, and the example above is written this way.

Without a spoken line, the model adds ambient sound and effects that fit the scene. To get a particular sound, name it in the prompt, for example "soft rain and violin in the background".

### Generate a video from an image

Pass one image in `image` and the clip opens on that picture. The image can be a public URL or a `data:image/...;base64,` data URL:

```bash theme={null}
curl -s -X POST "$BASE_URL/v1/videos" \
  -H "Authorization: Bearer $LAOZHANG_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
    "model": "gemini-omni-1.2-flash",
    "prompt": "The robot chef stirs the soup in the pot, raises a whisk and says cheerfully: \"Dinner is almost ready!\" The camera slowly pushes in as steam rises from the pot.",
    "resolution": "720p",
    "seconds": "6",
    "image": "https://example.com/robot-chef.jpg"
  }'
```

To upload a local file, send multipart form data with the image in `input_reference`:

```bash theme={null}
curl -s -X POST "$BASE_URL/v1/videos" \
  -H "Authorization: Bearer $LAOZHANG_API_KEY" \
  -F model=gemini-omni-1.2-flash \
  -F prompt="Waves break on the rocks below the lighthouse, clouds drift slowly, and the lighthouse beam comes on" \
  -F resolution=360p \
  -F seconds=5 \
  -F input_reference=@./lighthouse.jpg
```

Do not set `Content-Type: application/json` when you upload with `-F`. Each image can be up to 10 MB, in JPEG, PNG, or WebP.

### Generate from reference images

Send several images in `reference_images` and the model puts their people, objects, and settings into one clip. In the prompt, refer to them as "image 1", "image 2", and so on, in array order:

```bash theme={null}
curl -s -X POST "$BASE_URL/v1/videos" \
  -H "Authorization: Bearer $LAOZHANG_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
    "model": "gemini-omni-1.2-flash",
    "prompt": "The robot chef from image 2 walks into the ramen shop from image 1 and sits down at the counter. The cat sleeping next to it wakes up.",
    "resolution": "720p",
    "seconds": "8",
    "reference_images": [
      "https://example.com/ramen-shop.jpg",
      "https://example.com/robot-chef.jpg"
    ]
  }'
```

* `image` and `reference_images` together can hold at most 6 images. A seventh returns an error.
* In a multipart upload, the reference image field is `reference_images`, and you can repeat it.
* You can send `image` and `reference_images` together: `image` sets the opening shot, and the reference images supply the people or objects that should appear.
* For the limits on real people, see [Content restrictions](#content-restrictions).

### Portrait and 1080p

For a portrait clip, send `"aspect_ratio": "9:16"`. You can also use `size` to set the resolution and the ratio in one field, for example portrait 1080p:

```bash theme={null}
curl -s -X POST "$BASE_URL/v1/videos" \
  -H "Authorization: Bearer $LAOZHANG_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
    "model": "gemini-omni-1.2-flash",
    "prompt": "A cyclist rides through a coastal town from morning to sunset: market, harbor, cliff road, lighthouse",
    "size": "1080x1920",
    "seconds": "10"
  }'
```

The values `size` accepts are listed under [Request fields](#request-fields). The price follows the matching resolution tier: `1080x1920` is 1080p, so it costs \$0.45.

## Poll and download

### Get the task

```bash theme={null}
curl -s "$BASE_URL/v1/videos/$VIDEO_ID" \
  -H "Authorization: Bearer $LAOZHANG_API_KEY"
```

While the video renders, `status` is `in_progress` and `progress` gives a rough percentage:

```json theme={null}
{
  "id": "task_cpg5YjZdGpf5G64hpcehVFip3yEzBGmJ",
  "object": "video",
  "model": "gemini-omni-1.2-flash",
  "status": "in_progress",
  "progress": 24,
  "resolution": "360p",
  "seconds": "3",
  "size": "640x360",
  "created_at": 1794395880
}
```

When it completes, the task carries `video_url`:

```json theme={null}
{
  "id": "task_cpg5YjZdGpf5G64hpcehVFip3yEzBGmJ",
  "object": "video",
  "model": "gemini-omni-1.2-flash",
  "status": "completed",
  "progress": 100,
  "resolution": "360p",
  "seconds": "3",
  "size": "640x360",
  "created_at": 1794395880,
  "completed_at": 1794395908,
  "video_url": "https://media.laozhang.ai/videos/omni-video_b1c75730eec94afecd7a03e6-8a6288ae03f4.mp4"
}
```

A failed task has `status: "failed"` and the reason in `error.message`. Its charge has already been refunded:

```json theme={null}
{
  "id": "task_bgrPGFRI5wEwlOW0XrCy5b29xTGHlKbt",
  "object": "video",
  "model": "gemini-omni-1.2-flash",
  "status": "failed",
  "progress": 100,
  "resolution": "360p",
  "seconds": "3",
  "size": "640x360",
  "created_at": 1794395882,
  "error": {
    "code": "video_generation_failed",
    "message": "input_reference must be a public internet link. This request is not charged."
  }
}
```

### Download the video

```bash theme={null}
curl -L -o omni-video.mp4 "$(curl -s "$BASE_URL/v1/videos/$VIDEO_ID" \
  -H "Authorization: Bearer $LAOZHANG_API_KEY" | jq -r '.video_url')"
```

You can also call `GET /v1/videos/{id}/content` with your `Authorization` header; it returns the MP4 file. Video links stay available for 7 days, so download the file and store it yourself if you need it for longer.

### Minimal Python client

Requires `requests` (`pip install requests`):

```python theme={null}
import os
import time

import requests

BASE_URL = "https://api.laozhang.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['LAOZHANG_API_KEY']}"}

task = requests.post(
    f"{BASE_URL}/v1/videos",
    headers=HEADERS,
    json={
        "model": "gemini-omni-1.2-flash",
        "prompt": "A street musician plays the violin under a street lamp on a rain-soaked cobblestone street at dusk. The camera slowly pushes in. She stops, smiles at the camera and says: \"This one is for you.\" Soft rain and violin in the background.",
        "resolution": "720p",
        "seconds": "10",
        "aspect_ratio": "16:9",
    },
    timeout=120,
)
task.raise_for_status()
video_id = task.json()["id"]

deadline = time.time() + 15 * 60
while True:
    video = requests.get(f"{BASE_URL}/v1/videos/{video_id}", headers=HEADERS, timeout=60).json()
    if video["status"] == "completed":
        break
    if video["status"] == "failed":
        raise RuntimeError(video["error"]["message"])
    if time.time() > deadline:
        raise TimeoutError(f"{video_id} is still running; keep polling the same id later")
    time.sleep(5)

with open("omni-video.mp4", "wb") as f:
    f.write(requests.get(video["video_url"], timeout=300).content)
print("Saved omni-video.mp4,", video["size"], video["seconds"], "seconds")
```

## API reference

### Request fields

| Field | Required | Description |
| - | - | - |
| `model` | Yes | `gemini-omni-1.2-flash` |
| `prompt` | Yes | What happens on screen, the spoken lines, and the sound; up to 20,000 characters |
| `resolution` | No | `360p`, `720p` (default), or `1080p`; sets the price |
| `seconds` | No | A whole number from 3 to 10, default 10; does not change the price |
| `aspect_ratio` | No | `16:9` (default) or `9:16` |
| `size` | No | Resolution and ratio in pixels, in one field; values in the table below |
| `image` | No | One image for the opening shot; the multipart field name is `input_reference` |
| `reference_images` | No | Array of reference images; at most 6 images together with `image` |
| `reasoning_effort` | No | `low` or `high`; does not change the price |

How `size` maps to resolution and aspect ratio:

| `size` | Same as | Per video |
| - | - | -: |
| `640x360` / `360x640` | `360p`, 16:9 / 9:16 | \$0.10 |
| `1280x720` / `720x1280` | `720p`, 16:9 / 9:16 | \$0.30 |
| `1920x1080` / `1080x1920` | `1080p`, 16:9 / 9:16 | \$0.45 |

Unsupported input is rejected at submission and not charged:

* Reference video, reference audio, and a last frame (fields such as `video_url` and `last_frame`).
* 2K and 4K, and any aspect ratio other than `16:9` and `9:16`.
* `seconds` below 3 or above 10.

### Output format

* Format: MP4 with H.264 video and an AAC audio track, at 24 fps.
* Size and length match the request. For example, `720p` with `9:16` gives 720×1280.
* The file carries Google's C2PA content credentials and an invisible SynthID watermark. There is no visible watermark on the picture.

### Task status

| `status` | Meaning | Next step |
| - | - | - |
| `queued` | Created, waiting to render | Keep polling |
| `in_progress` | Rendering; `progress` is a rough percentage | Keep polling |
| `completed` | Done | Download from `video_url` |
| `failed` | Failed and refunded | Fix the request according to `error.message` and create a new task |

### Content restrictions

The model blocks two kinds of content. A blocked task comes back as `failed` and is refunded in full:

* Real people: a real person's name in the prompt is blocked. The model does not generate real people's likenesses either, so images such as celebrity photos may be blocked.
* Sexual content and copyright-protected characters.

Ordinary images of people, such as AI-generated portraits, work normally.

### Errors

The table lists each error by where it appears:

| Where | `message` starts with | Fix |
| - | - | - |
| HTTP 400 at submission | `seconds must be a whole number from 3 to 10.` | Set `seconds` to a whole number from 3 to 10 |
| HTTP 400 at submission | `resolution must be one of 360p, 720p, 1080p` | 2K and 4K are not available; use one of the three tiers |
| HTTP 400 at submission | `aspect_ratio must be one of 16:9, 9:16.` | Use `16:9` or `9:16` |
| HTTP 400 at submission | `video_url is not supported` | Remove the reference video field and send only a prompt and images |
| HTTP 400 at submission | `Send at most 6 images in total` | Send 6 images or fewer |
| Task `failed` | `Could not download …` | Use an image link anyone can download, or send a data URL |
| Task `failed` | `The prompt or images were blocked` | Remove the real person's name or photo, or the restricted content, then retry |
| Task `failed` | `Video generation failed because of a temporary service error.` | Submit the request again |

## FAQ

### How much does the Gemini Omni 1.2 Flash API cost per video?

The price depends on resolution: \$0.10 per video at 360p, \$0.30 at 720p, and \$0.45 at 1080p, for any length from 3 to 10 seconds. A 10-second clip costs about 43% of Google's list price; the comparison is under [Pricing](#pricing).

### Do I need a Google account or Gemini API key for Gemini Omni?

No. Call `POST /v1/videos` with a LaoZhang API token in the `default` group, with the billing mode set to Usage first.

### How long can Gemini Omni 1.2 Flash videos be? Does it do 4K?

One clip runs 3 to 10 seconds, and the highest resolution is 1080p; 2K and 4K are not available. For one continuous clip of 20–60 seconds, use [Muse](https://docs.laozhang.ai/en/api-capabilities/muse-video-generation.md). For 2K, use [MiniMax H3](https://docs.laozhang.ai/en/api-capabilities/minimax-h3-video-generation.md).

### Do Gemini Omni 1.2 Flash videos have a watermark?

There is no visible watermark on the picture. The file carries Google's C2PA content credentials and an invisible SynthID watermark, which mark the video as AI-generated.

### How long does Gemini Omni 1.2 Flash take to generate a video?

Short 360p clips usually take 30–60 seconds, a 10-second 720p clip about 1 minute, and a 10-second 1080p clip about 1.5–2 minutes. The endpoint is asynchronous: submitting and polling both return immediately, so poll every 5–10 seconds.

### How do I switch Muse or Sora 2 code to Gemini Omni 1.2 Flash?

The endpoint is the same, so the create and poll paths stay as they are, and so does your token. Change three things:

* Set `model` to `gemini-omni-1.2-flash`.
* Set `seconds` to a value from 3 to 10.
* Add `resolution` when you want 360p or 1080p; without it you get 720p.

## Related docs and sources

* [Video generation API comparison and pricing](https://docs.laozhang.ai/en/api-capabilities/video-generation-guide.md): what one clip costs on each video model, with endpoints and token groups.
* [Muse video API](https://docs.laozhang.ai/en/api-capabilities/muse-video-generation.md): 20–60 second clips and video continuation on the same endpoint.
* [Models and pricing](https://docs.laozhang.ai/en/models.md)
* [Gemini Omni 1.2 Flash launch announcement](https://docs.laozhang.ai/en/announcements/gemini-omni-1-2-flash-2026-11.md)
* [Google: Introducing Gemini Omni 1.2 Flash](https://blog.google/innovation-and-ai/technology/developers-tools/introducing-gemini-omni-1-2-flash/) (model capabilities, checked November 11, 2026)
* [Google: Gemini API pricing](https://ai.google.dev/gemini-api/docs/pricing) (Google's per-second prices, checked November 11, 2026)


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