# Gemini Omni 1.1 Flash API Google Gemini Omni 1.1 Flash 動画生成モデルの完全な API リファレンスです。 ## モデルバリエーション この API は 4 つのモデルバリエーションをサポートしています。 | モデル | ID | 説明 | |-------|-----|-------------| | **Gemini Omni 1.1 Flash Text to Video** | `gemini-omni-1.1-flash-text-to-video` | テキストプロンプトから動画を生成します | | **Gemini Omni 1.1 Flash Image to Video** | `gemini-omni-1.1-flash-image-to-video` | 必須の開始画像をアニメーション化し、任意で終了フレームを指定できます | | **Gemini Omni 1.1 Flash Video Edit** | `gemini-omni-1.1-flash-video-edit` | プロンプトに従って既存の動画を変更します | | **Gemini Omni 1.1 Flash Reference to Video** | `gemini-omni-1.1-flash-reference-to-video` | 任意の画像および動画リファレンスから動画を生成します | ## クイック比較 | 機能 | Text to Video | Image to Video | Video Edit | Reference to Video | |---------|---------------|----------------|------------|--------------------| | 主な入力 | テキストプロンプト | 開始画像 + テキストプロンプト | ソース動画 + テキストプロンプト | テキストプロンプト + 任意のリファレンス | | 長さ | 3~10 秒 | 3~10 秒 | ソース動画は 3~10 秒である必要があります | 3~10 秒 | | 解像度オプション | 360p, 720p, 1080p, 4k | 360p, 720p, 1080p, 4k | 360p, 720p, 1080p, 4k | 360p, 720p, 1080p, 4k | | アスペクト比 | 16:9, 9:16 | 16:9, 9:16 | サポートされていません | 16:9, 9:16 | | 任意の入力 | なし | 終了画像 | なし | 最大 10 枚の画像と 3 本の動画 | ## 共通エンドポイント Gemini Omni 1.1 Flash のすべてのバリエーションは、動画タスクエンドポイントを使用します。 ``` POST /api/v1/video/task ``` ## Gemini Omni 1.1 Flash Text to Video ### 必須パラメータ | パラメータ | 型 | 説明 | |-----------|------|-------------| | `model_name` | string | `"gemini-omni-1.1-flash-text-to-video"` を指定する必要があります | | `prompt` | string | 生成する動画のテキスト説明 | | `aspect_ratio` | string | 出力アスペクト比:`"16:9"` または `"9:16"` | | `resolution` | string | 出力解像度:`"360p"`、`"720p"`、`"1080p"`、または `"4k"` | | `duration` | number | 出力時間(秒):3~10 | ### リクエスト例 ```javascript const response = await fetch('https://api.flaq.ai/api/v1/video/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'gemini-omni-1.1-flash-text-to-video', prompt: 'A cinematic tracking shot follows a sailboat crossing a glowing ocean at sunset', aspect_ratio: '16:9', resolution: '1080p', duration: 8 }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## Gemini Omni 1.1 Flash Image to Video ### 必須パラメータ | パラメータ | 型 | 説明 | |-----------|------|-------------| | `model_name` | string | `"gemini-omni-1.1-flash-image-to-video"` を指定する必要があります | | `prompt` | string | 希望する動きとシーン展開のテキスト説明 | | `image_url` | string | 必須の開始フレーム画像の URL | | `aspect_ratio` | string | 出力アスペクト比:`"16:9"` または `"9:16"` | | `resolution` | string | 出力解像度:`"360p"`、`"720p"`、`"1080p"`、または `"4k"` | | `duration` | number | 出力時間(秒):3~10 | ### 任意のパラメータ | パラメータ | 型 | 説明 | |-----------|------|-------------| | `image_end_url` | string | 任意の終了フレーム画像の URL | ### リクエスト例 ```javascript { model_name: 'gemini-omni-1.1-flash-image-to-video', prompt: 'The girl walks toward the camera while the city lights shimmer behind her', image_url: 'https://example.com/start-frame.jpg', image_end_url: 'https://example.com/end-frame.jpg', aspect_ratio: '9:16', resolution: '1080p', duration: 8 } ``` ## Gemini Omni 1.1 Flash Video Edit ### 必須パラメータ | パラメータ | 型 | 説明 | |-----------|------|-------------| | `model_name` | string | `"gemini-omni-1.1-flash-video-edit"` を指定する必要があります | | `prompt` | string | 適用する編集内容を説明するテキスト指示 | | `video_url` | string | ソース動画の URL。ソース動画の長さは 3~10 秒である必要があります | | `resolution` | string | 出力解像度:`"360p"`、`"720p"`、`"1080p"`、または `"4k"` | **注:** Video Edit は `aspect_ratio` または `duration` をサポートしていません。リクエストにどちらのパラメータも含めないでください。 ### リクエスト例 ```javascript { model_name: 'gemini-omni-1.1-flash-video-edit', prompt: 'A small ball rolls into the scene and captures the attention of the cat', video_url: 'https://example.com/source-video.mp4', resolution: '1080p' } ``` ## Gemini Omni 1.1 Flash Reference to Video リファレンス画像と動画は任意で、個別に使用することも、一緒に使用することもできます。 ### 必須パラメータ | パラメータ | 型 | 説明 | |-----------|------|-------------| | `model_name` | string | `"gemini-omni-1.1-flash-reference-to-video"` を指定する必要があります | | `prompt` | string | 生成する動画のテキスト説明 | | `aspect_ratio` | string | 出力アスペクト比:`"16:9"` または `"9:16"` | | `resolution` | string | 出力解像度:`"360p"`、`"720p"`、`"1080p"`、または `"4k"` | | `duration` | number | 出力時間(秒):3~10 | ### 任意のリファレンス入力 | パラメータ | 型 | 説明 | |-----------|------|-------------| | `images` | string[] | 最大 10 件のリファレンス画像 URL | | `videos` | string[] | 最大 3 件のリファレンス動画 URL。各動画は 3 秒以内である必要があります | ### リクエスト例 ```javascript { model_name: 'gemini-omni-1.1-flash-reference-to-video', prompt: 'Use the references to create a cinematic shot of a small boat approaching from the distance', aspect_ratio: '16:9', resolution: '1080p', duration: 8, images: ['https://example.com/boat-reference.jpg'], videos: ['https://example.com/motion-reference.mp4'] } ``` ## レスポンス形式 ### 初期レスポンス すべてのモデルは、ポーリング用の `task_id` を返します。 ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "submitted" } } ``` ### ポーリングレスポンス ステータスを確認するには、`GET /api/v1/video/{taskId}` をポーリングします。 ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "succeed", "task_status_msg": null, "task_result": { "credit": 0.2, "videos": [ { "url": "https://example.com/generated-video.mp4" } ] } } } ``` ### ステータス値 - `submitted`:タスクが受け付けられ、処理を待機しています - `processing`:動画を生成中です - `succeed`:動画生成が完了しました - `failed`:動画生成に失敗しました ## ベストプラクティス 1. **プロンプトの指定**:被写体、動作、カメラの動き、照明、シーンの進行を明確に記述してください。 2. **必須設定**:サポートされている解像度を必ず指定し、Video Edit 以外では、サポートされているアスペクト比と長さも指定してください。 3. **画像入力**:開始画像、終了画像、リファレンス画像には、安定して一般公開されている URL を使用してください。 4. **Video Edit の入力**:送信前に、ソース動画が 3~10 秒であることを確認してください。 5. **リファレンスの制限**:画像は 10 枚、動画は 3 本までとし、各リファレンス動画の長さを 3 秒以下にしてください。