# Gemini Omni Flash — /videos/generations

Gemini Omni Flash video generation (async): Google's next-generation video model. One endpoint, parameters pick the mode - no image is text-to-video, one image (image) is the first frame, two images (images) are first + last frame, and image_role=reference makes 1-3 images subject / style references. duration=6 / 8 / 10 seconds, resolution=720P / 1080P, size=16:9 / 9:16, native audio, and strong at following a storyboard across several shots. Returns a job id (HTTP 202); poll GET /v1/videos/jobs/{id} until status=succeeded, result in data[0].url (a re-hosted mp4 kept for 60 days). Billed per second at $0.05/s ($0.30 / $0.40 / $0.50), the same at both resolutions; fully refunded on failure.

**Endpoint:** `POST https://nezhagate.com/v1/videos/generations`

## Authentication
```
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## Request body
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `model` | string | Yes | Model ID, here gemini-omni-flash. |
| `prompt` | string | Yes | Text prompt describing the video, camera and motion, up to 20000 characters (Chinese and English count the same). With reference images you can point at them as @Image1 / @Image2 in the prompt. |
| `duration` | integer | No | Length: 6 / 8 / 10 seconds (default 6); alias seconds. Billed per second at $0.05/s, i.e. $0.30 / $0.40 / $0.50. |
| `resolution` | string | No | Resolution: 720P / 1080P (default 720P), both at the same rate. |
| `size` | string | No | Aspect ratio: 16:9 (default) / 9:16; alias aspect_ratio. Other ratios are refused. |
| `audio` | boolean | No | This model always generates native audio; the parameter can be omitted (false is rejected). |
| `image` | string | No | One reference image (public URL, data: URI or base64): image-to-video with it as the first frame. Send no image for text-to-video. |
| `images` | array | No | Up to 3 images (each up to 16 MB, jpg / png / webp / gif). image_role=first_frame (the default for 1-2 images): image 1 is the first frame and image 2 the last frame. image_role=reference: 1-3 subject / style references that are not used as frames; 3 images default to reference. Alias reference_images (implies reference). Exceeding the cap is rejected, never truncated. |
| `image_role` | string | No | How the images are used: first_frame (first frame; with two images the second is the last frame) or reference (subject / style references). Omitted: 1-2 images mean first_frame, 3 mean reference. |

## Request example
```bash
# 1) submit -> 202 {"id":"img_...","status":"queued"}
curl https://nezhagate.com/v1/videos/generations -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"model": "gemini-omni-flash", "prompt": "a paper crane unfolding over a misty lake", "duration": 8, "resolution": "720P", "size": "16:9"}'
# first frame: also pass  "image": "https://example.com/first-frame.png"
# first + last frame: "images": ["https://example.com/first.png", "https://example.com/last.png"]
# 1-3 references: "images": [...], "image_role": "reference"
# 2) poll every ~5s until status=succeeded, then read data[0].url
curl https://nezhagate.com/v1/videos/jobs/img_3f9a...c2 -H 'Authorization: Bearer YOUR_API_KEY'
```

## Response
```json
{
  "id": "img_3f9a...c2",
  "object": "video.generation.job",
  "status": "queued",
  "model": "gemini-omni-flash"
}
```