> ## 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 動画生成と編集

> 公式 Gemini Omni 1.1 Flash Preview で 3-10 秒動画の生成, 編集, 延長を 4 種類の解像度で実行

* `model` に `gemini-omni-1.1-flash-preview-official` を指定します
* テキスト→動画, 画像→動画, 参照動画生成, 動画編集, 動画延長に対応します
* 参照画像は最大 10 件, 入力動画は最大 3 件. 画像と動画は同一リクエストで併用できます
* 長さは 3-10 秒. 解像度は 360p / 720p / 1080p / 4K
* 非同期タスク API です. 送信後はタスク ID で結果を取得します

> [!NOTE]
>
> 中国本土ではサンプルのドメインを `https://toapis.cn` に変更できます.

> [!WARNING]
>
> ローカル画像は[画像アップロード API](https://docs.toapis.com/docs/ja/api-reference/uploads/images.md), ローカル動画は[動画アップロード API](https://docs.toapis.com/docs/ja/api-reference/uploads/videos.md)で先にアップロードし, 返された URL を指定してください. base64 メディアを直接送らないでください.

## Authorizations

**Authorization** `string` *required*

Bearer トークン認証を使用します：

```
Authorization: Bearer YOUR_API_KEY
```

## Body

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

モデル名. `gemini-omni-1.1-flash-preview-official` を指定します.

**prompt** `string` *required*

生成, 編集, 延長する動画のプロンプト.

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

動画の長さ（秒）, `3`-`10` の整数. `extend` タスクでは延長する長さを示し, 省略時は約 10 秒です.

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

アスペクト比：

* `16:9` 横
* `9:16` 縦

`edit` と `extend` タスクでは送信しません.

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

動画解像度：

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

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

参照画像 URL の配列. 最大 `10` 件. 省略時はテキスト→動画になります. `video_list` と併用できます（例: 動画を延長する際に参照画像を添付）.

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

入力動画. 最大 `3` 件で, 各要素に `video_url` が必須です. 例: `{ "video_url": "https://example.com/input.mp4" }`. HTTPS URL, data URI, プラットフォームのアップロード URL に対応し, ダウンロードされる入力動画は 1 件 50 MB まで, MP4/MOV のみ. `image_urls` と併用でき, 動画と参照画像の混合入力に対応します. `edit` と `extend` タスクでは必須です.

**metadata** `object`

Interactions の生成パラメータ（任意）. `temperature`（`0.0`–`2.0`）, `topP` / `top_p`（`0.0`–`1.0`）, `candidateCount` / `candidate_count`, `previous_interaction_id`, `task`（`text_to_video`, `image_to_video`, `reference_to_video`, `edit`, `extend`）をサポートします. `task` 省略時はプラットフォームが既定値を補わず, プロンプトとメディアから上流モデルが推論します. `edit` と `extend`（または入力動画があり他のタスク未指定）では `aspect_ratio` を省略します. `extend` は `video_list` の元動画を続き撮りし, `previous_interaction_id` と併用できません.

`generateAudio`, `negativePrompt`, `seed` など Veo 専用パラメータは使用できません.

## Response

**id** `string`

タスク ID. ステータス照会に使用します.

**object** `string`

オブジェクト種別. 通常は `generation.task`.

**model** `string`

使用されたモデル名.

**status** `string`

タスク状態: `queued`, `in_progress`, `completed`, `failed`.

**created\_at** `integer`

タスク作成タイムスタンプ.

**video\_url** `string`

タスク完了後の生成動画 URL.

## 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"
  }'
```

動画編集の例：

```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"}
  }'
```

動画延長の例（`duration` は延長秒数で, 省略時は約 10 秒. 出力は元動画に延長部分を連結したものです）：

```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
}
```

## タスクの照会

送信レスポンスはタスク ID を返します. 共通の動画タスク照会エンドポイントで状態と結果を取得します:

```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.