> ## 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 Flash 動画生成

> Gemini Omni Flash でテキスト、最大 10 枚の参照画像、または最大 3 本の入力動画から動画を生成・編集

> [!NOTE]
>
> **中国本土のユーザー向け：** 中国本土のユーザーは `https://toapis.cn` を API エンドポイント（Base URL）としてご利用ください。本ドキュメント内の例では `https://toapis.com` を `https://toapis.cn` に置き換えてください。

* Use `gemini-omni-flash-preview-official` in the `model` field
* Supports text-to-video, image/reference-to-video, and video editing
* Supports up to 10 reference images and up to 3 input videos; images and videos can be combined in one request
* Video duration is limited to 10 seconds; the Playground offers 4 / 6 / 8 / 10 second presets
* Only `720p` resolution is supported; both `16:9` and `9:16` aspect ratios are available
* Async task API: submit a task, then query by task ID

> [!NOTE]
>
> This page documents `gemini-omni-flash-preview-official`. The platform routes it through the Vertex AI Interactions API, not the Vertex AI Publisher Model `predictLongRunning` endpoint. It is separate from the legacy `gemini-omni-flash` / `gemini_omni_flash` model.

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

## Authorizations

**Authorization** `string` *required*

Use Bearer Token authentication:

```
Authorization: Bearer YOUR_API_KEY
```

## Body

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

モデル name. Use `gemini-omni-flash-preview-official`.

**prompt** `string` *required*

Text prompt for video generation.

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

Video duration in seconds. The maximum is `10`; the Playground offers `4`, `6`, `8`, and `10` second presets.

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

Video aspect ratio:

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

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

Video resolution:

* `720p` default resolution
* Only `720p` is supported; Veo-specific parameters are not accepted

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

Optional reference image URL array with up to `10` items. Omit it 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 for video editing, with up to `3` items. Each object must contain `video_url`. Can be combined with `image_urls` for mixed image-plus-video input.

**metadata** `object`

Optional generation controls: `temperature`, `topP` / `top_p`, `candidateCount` / `candidate_count`, `previous_interaction_id`, and `task` (`text_to_video`, `image_to_video`, `reference_to_video`, `edit`, or `extend`). `extend` continues a source video supplied through `video_list`, cannot be combined with `previous_interaction_id`, and omits `aspect_ratio`.

## レスポンス

**id** `string`

Task ID for status polling.

**object** `string`

Object type, usually `generation.task`.

**model** `string`

モデル name used for the request.

**status** `string`

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

**created\_at** `integer`

Task creation timestamp.

**video\_url** `string`

Generated video URL when 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-flash-preview-official",
    "prompt": "A blue pump bottle slowly rotates in a clean white studio, commercial product video",
    "duration": 6,
    "aspect_ratio": "9:16",
    "resolution": "720p",
    "image_urls": ["https://example.com/reference.jpg"]
  }'
```

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-flash-preview-official",
    "prompt": "Continue the same scene and camera motion",
    "duration": 5,
    "video_list": [{"video_url": "https://example.com/input.mp4"}],
    "metadata": {"task": "extend"}
  }'
```

```json 200 theme={null}
{
  "id": "video_01JZEXAMPLE",
  "object": "generation.task",
  "model": "gemini-omni-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.