Gemini Omni 1.1 Flash API
Google Gemini Omni 1.1 Flash 動画生成モデルの完全な API リファレンスです。
モデルバリエーション {#}
この API は 4 つのモデルバリエーションをサポートしています。
クイック比較
共通エンドポイント
Gemini Omni 1.1 Flash のすべてのバリエーションは、動画タスクエンドポイントを使用します。
POST /api/v1/video/task
Gemini Omni 1.1 Flash Text to Video
必須パラメータ
リクエスト例
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: '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
必須パラメータ
注: Video Edit は aspect_ratio または duration をサポートしていません。リクエストにどちらのパラメータも含めないでください。
リクエスト例
{
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: '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 を返します。
{
"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} をポーリングします。
{
"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": {
"videos": [
{
"url": "https://example.com/generated-video.mp4"
}
]
}
}
}
ステータス値
submitted:タスクが受け付けられ、処理を待機しています
processing:動画を生成中です
succeed:動画生成が完了しました
failed:動画生成に失敗しました
ベストプラクティス
- プロンプトの指定:被写体、動作、カメラの動き、照明、シーンの進行を明確に記述してください。
- 必須設定:サポートされている解像度を必ず指定し、Video Edit 以外では、サポートされているアスペクト比と長さも指定してください。
- 画像入力:開始画像、終了画像、リファレンス画像には、安定して一般公開されている URL を使用してください。
- Video Edit の入力:送信前に、ソース動画が 3~10 秒であることを確認してください。
- リファレンスの制限:画像は 10 枚、動画は 3 本までとし、各リファレンス動画の長さを 3 秒以下にしてください。