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

# Gemini Omni 1.1 Video Generation and Editing

> Generate, edit or extend 3-10 second videos with official Gemini Omni 1.1 Flash Preview at four resolutions

* Set `model` to `gemini-omni-1.1-flash-preview-official`
* Supports text-to-video, image-to-video, reference-to-video, video editing and video extension
* Up to 10 reference images and up to 3 input videos; images and videos can be combined in one request
* Duration 3-10 seconds; resolutions 360p / 720p / 1080p / 4K
* Async task API; query results by task ID after submission

> [!NOTE]
>
> Users in mainland China can replace the example domain with `https://toapis.cn`.

> [!WARNING]
>
> Upload local images via the [Image Upload API](https://docs.toapis.com/docs/en/api-reference/uploads/images.md) and local videos via the [Video Upload API](https://docs.toapis.com/docs/en/api-reference/uploads/videos.md) first, then pass the returned URLs. Do not pass base64 media data directly.

## Authorizations

**Authorization** `string` *required*

Bearer token authentication:

```
Authorization: Bearer YOUR_API_KEY
```

## Body

**model** `string` *required* (default: gemini-omni-1.1-flash-preview-official)

Model name. Use `gemini-omni-1.1-flash-preview-official`.

**prompt** `string` *required*

Prompt describing the video to generate, edit, or extend.

**duration** `integer` (default: 6)

Video duration in seconds, integer `3`-`10`. For `extend` tasks this is the continuation length, about 10 seconds when omitted.

**aspect\_ratio** `string` (default: 16:9)

Aspect ratio:

* `16:9` landscape
* `9:16` portrait

Not sent for `edit` and `extend` tasks.

**resolution** `string` (default: 720p)

Video resolution:

* `360p`
* `720p`
* `1080p`
* `4K`

**image\_urls** `string[]`

Optional reference image URL array, up to `10` items. Omit for text-to-video. Can be combined with `video_list`, for example to attach reference images when extending a video.

**video\_list** `object[]`

Optional input videos, up to `3` items. Each object must contain `video_url`, for example `{ "video_url": "https://example.com/input.mp4" }`. HTTPS URLs, data URIs, and platform-uploaded video URLs are supported. Each downloaded input video is limited to 50 MB, MP4/MOV. Can be combined with `image_urls` for mixed image-plus-video input. Required for `edit` and `extend` tasks.

**metadata** `object`

Optional Interactions generation controls. Supported keys include `temperature` (`0.0`–`2.0`), `topP` / `top_p` (`0.0`–`1.0`), `candidateCount` / `candidate_count`, `previous_interaction_id`, and `task` (`text_to_video`, `image_to_video`, `reference_to_video`, `edit`, or `extend`). When `task` is omitted, the platform does not invent a default; the upstream model infers the mode from the prompt and media. The platform omits `aspect_ratio` for `edit` and `extend` paths (or video inputs without an explicit task). `extend` continues a source video supplied through `video_list` and cannot be combined with `previous_interaction_id`.

Veo-specific parameters such as `generateAudio`, `negativePrompt` and `seed` are not supported.

## Response

**id** `string`

Task ID used to query status.

**object** `string`

Object type, usually `generation.task`.

**model** `string`

The model name used.

**status** `string`

Task status: `queued`, `in_progress`, `completed`, `failed`.

**created\_at** `integer`

Task creation timestamp.

**video\_url** `string`

Generated video URL once the task completes.

## Examples

```bash cURL theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-omni-1.1-flash-preview-official",
    "prompt": "A red paper boat floating on a calm lake at sunrise",
    "duration": 3,
    "aspect_ratio": "16:9",
    "resolution": "360p"
  }'
```

Video editing example:

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-omni-1.1-flash-preview-official",
    "prompt": "Change the sky to a warm sunset",
    "duration": 6,
    "resolution": "1080p",
    "video_list": [{"video_url": "https://example.com/uploaded-video.mp4"}],
    "metadata": {"task": "edit"}
  }'
```

Video extension example (`duration` is the continuation length in seconds, about 10 when omitted; the output is the source video plus the continuation):

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-omni-1.1-flash-preview-official",
    "prompt": "Continue the scene: the subject keeps moving naturally",
    "duration": 5,
    "video_list": [{"video_url": "https://example.com/uploaded-video.mp4"}],
    "metadata": {"task": "extend"}
  }'
```

```json 200 theme={null}
{
  "id": "video_01JZEXAMPLE",
  "object": "generation.task",
  "model": "gemini-omni-1.1-flash-preview-official",
  "status": "queued",
  "created_at": 1779247407
}
```

## Query Task

The generation endpoint returns a task ID. Use the common video task status endpoint to fetch status and results:

```bash theme={null}
curl --request GET \
  --url https://toapis.com/v1/videos/generations/{task_id} \
  --header "Authorization: Bearer YOUR_API_KEY"
```


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