Gemini Omni Flash
Gemini Omni 1.2 通常版
通常版はテキストと画像からの動画生成に対応. 4-15 秒 / 720p. 参照画像は最大 5 枚, 最初/最後のフレーム指定も可能.
通常版はテキストと画像からの動画生成に対応. 4-15 秒 / 720p. 参照画像は最大 5 枚, 最初/最後のフレーム指定も可能.
プラットフォームの API Key を使用します. 中国本土では https://toapis.cn を利用できます.
リクエストパラメータ
Authorizationstringヘッダー必須Bearer YOUR_API_KEY
modelstringボディ必須gemini-omni-1.2-flash-preview
promptstringボディ必須必須の動画説明.
durationintegerボディデフォルト: 10動画の長さは 4-15 秒. 省略時は 10 秒.
resolutionstringボディデフォルト: 720p720p
aspect_ratiostringボディデフォルト: 16:916:9 または 9:16. 既定は 16:9.
image_urlsstring[]ボディ参照画像として公開画像 URL を最大 5 枚.
first_image_urlstringボディ最初のフレーム画像の公開 URL.
last_image_urlstringボディ最後のフレーム画像の公開 URL.
ローカル素材は先にアップロードして公開 URL を取得します. base64, data URI, ローカルパスは送信しません. 動画入力は非対応です.
リクエスト例
curl https://toapis.com/v1/videos \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gemini-omni-1.2-flash-preview",
"prompt": "A cinematic tracking shot through a sunlit city",
"duration": 10,
"resolution": "720p",
"aspect_ratio": "16:9",
"image_urls": ["https://example.com/image.png"]
}'首尾フレームの例
curl https://toapis.com/v1/videos \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gemini-omni-1.2-flash-preview",
"prompt": "Generate a video from the first and last frames",
"duration": 6,
"first_image_url": "https://example.com/first.png",
"last_image_url": "https://example.com/last.png"
}'タスクの確認
送信するとプラットフォームの task id が返ります. GET /v1/videos/{id} でポーリングし, 完了後に動画結果を取得します. サプライヤーの task_id やサプライヤーのポーリングエンドポイントは使用しないでください.
curl https://toapis.com/v1/videos/YOUR_TASK_ID \
-H 'Authorization: Bearer YOUR_API_KEY'レスポンス例
{
"id": "vid_example",
"object": "generation.task",
"model": "gemini-omni-1.2-flash-preview",
"status": "queued",
"created_at": 1789600000
}