> ## 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` を指定します. プレビューモデルで, テキストや画像からの動画生成, 参照画像の利用, 動画編集に対応します.

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

## パラメータ

`Authorization: Bearer YOUR_API_KEY`

| フィールド           | 説明                                                                                   |
| --------------- | ------------------------------------------------------------------------------------ |
| `model`         | `gemini-omni-1.1-flash-preview-official`                                             |
| `prompt`        | 必須. 生成または編集する内容を指定します.                                                               |
| `duration`      | 3-10 秒の整数. デフォルトは 6 秒.                                                               |
| `resolution`    | 360p / 720p / 1080p / 4K. デフォルトは 720p.                                               |
| `aspect_ratio`  | 16:9 / 9:16. デフォルトは 16:9. 動画編集では送信しません.                                              |
| `image_urls`    | 参照画像 URL は最大 10 件. 入力動画との併用はできません.                                                   |
| `video_list`    | video\_url を含むオブジェクトを最大 3 件. MP4/MOV のみ, 各 50 MiB 以下.                                |
| `metadata.task` | 任意: text\_to\_video / image\_to\_video / reference\_to\_video / edit. 省略時はモデルが判断します. |

メディアをアップロードし, 取得した URL を指定してください. generateAudio, negativePrompt, seed など Veo 専用パラメータは使用できません. 動画入力には video\_list を使用します.

## 料金

USD. 出力は要求した秒数で課金します. 入力動画はサーバーで長さを測定し, 各動画を整数秒へ切り上げて \$0.006950/秒を追加課金します. 以下は基本料金で, 割引は見積もりに従います.

| 出力解像度 |     1 秒あたり |
| ----- | ---------: |
| 360p  | \$0.027034 |
| 720p  | \$0.081088 |
| 1080p | \$0.121632 |
| 4K    | \$0.243264 |

## リクエスト例

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

```json theme={null}
{
  "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"}
}
```

## 結果の取得

送信レスポンスのタスク id を使い, 統一タスク API から状態と結果を取得します.

```bash theme={null}
curl https://toapis.com/v1/videos/generations/TASK_ID \
  -H "Authorization: Bearer YOUR_API_KEY"
```
