# Gemini Omni 1.1 Flash API

> Edit an existing clip with Gemini Omni 1.1 Flash — describe the change and it re-renders the video, with a native 360p tier at half price.

- **Provider**: Google
- **Model id**: `gemini-omni-1-1-flash-edit`
- **Modality**: video
- **Price**: 80–135 credits

## Overview

Gemini Omni 1.1 Flash is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `gemini-omni-1-1-flash-edit` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL we POST the finished task to. Signed with `X-Webhook-Signature` once you create a webhook signing key in Dashboard → Settings |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| prompt | string | Yes | What to change. Use @Video1 for the source clip and @Image1, @Image2 … for reference images. (example: Make @Video1 look like it was filmed underwater) |
| reference_video_urls | string[] | Yes | The clip to edit. Exactly one video, up to 30 seconds. The edited result is about 10 seconds long — use the frame range below to choose which part of a longer clip to edit. (image URL) |
| reference_image_urls | string[] | No | Extra images the edit should follow. They count toward the 7-reference total with the source video. (image URL) |
| resolution | string | No | Options: 360p \| 720p \| 1080p \| 4k (default: 720p) |
| start_frame | number | No | First source frame index included in the edit. Leave empty to start at the beginning. |
| end_frame | number | No | Last source frame index included in the edit. Leave empty to run to the end. |
| seed | number | No | Reuse a seed to repeat a result closely. |
| allow_audio_filtered | boolean | No | When on, the video is delivered without audio instead of failing if the audio track is filtered. (true/false) (default: false) |
| nsfw_check | boolean | No | Check uploaded media for NSFW content. (true/false) (default: true) |

### Request example

```json
{
  "modelId": "gemini-omni-1-1-flash-edit",
  "input": {
    "prompt": "Make @Video1 look like it was filmed underwater",
    "reference_video_urls": [
      "https://you.bot/examples/gemini-omni.mp4"
    ],
    "reference_image_urls": [
      "https://you.bot/examples/grok-imagine-text-to-image.jpg"
    ],
    "resolution": "720p",
    "start_frame": 1,
    "end_frame": 1,
    "seed": 1,
    "allow_audio_filtered": false,
    "nsfw_check": true
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 135
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=gemini-omni-1-1-flash-edit`

When `state` is `success`, the output is in `resultUrls`: `{ "state": "success", "resultUrls": [ ... ] }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed — check API Key |
| 402 | Insufficient account balance |
| 403 | IP not allowed for this key, or the key is restricted to other models |
| 404 | Task not found, or it has expired |
| 409 | Duplicate request — an identical submit arrived moments ago. Nothing was charged; retry is safe |
| 413 | Payload too large — see the character and file-size limits for this model |
| 429 | Rate limit exceeded — retry after the Retry-After header |
| 500 | Internal server error |
| 504 | Upstream timed out — nothing was delivered; retry is safe |
