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"
}'
{
"id": "video_01JZEXAMPLE",
"object": "generation.task",
"model": "gemini-omni-1.1-flash-preview-official",
"status": "queued",
"created_at": 1779247407
}
Gemini Omni Official
Gemini Omni 1.1 動画生成と編集
公式 Gemini Omni 1.1 Flash Preview で 3-10 秒動画の生成, 編集, 延長を 4 種類の解像度で実行
POST
/
v1
/
videos
/
generations
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"
}'
{
"id": "video_01JZEXAMPLE",
"object": "generation.task",
"model": "gemini-omni-1.1-flash-preview-official",
"status": "queued",
"created_at": 1779247407
}
modelにgemini-omni-1.1-flash-preview-officialを指定します- テキスト→動画, 画像→動画, 参照動画生成, 動画編集, 動画延長に対応します
- 参照画像は最大 10 件, 入力動画は最大 3 件. 画像と動画は同一リクエストで併用できます
- 長さは 3-10 秒. 解像度は 360p / 720p / 1080p / 4K
- 非同期タスク API です. 送信後はタスク ID で結果を取得します
中国本土ではサンプルのドメインを
https://toapis.cn に変更できます.ローカル画像は画像アップロード API, ローカル動画は動画アップロード APIで先にアップロードし, 返された URL を指定してください. base64 メディアを直接送らないでください.
Authorizations
string
必須
Bearer トークン認証を使用します:
Authorization: Bearer YOUR_API_KEY
Body
string
デフォルト:"gemini-omni-1.1-flash-preview-official"
必須
モデル名.
gemini-omni-1.1-flash-preview-official を指定します.string
必須
生成, 編集, 延長する動画のプロンプト.
integer
デフォルト:"6"
動画の長さ(秒),
3-10 の整数. extend タスクでは延長する長さを示し, 省略時は約 10 秒です.string
デフォルト:"16:9"
アスペクト比:
16:9横9:16縦
edit と extend タスクでは送信しません.string
デフォルト:"720p"
動画解像度:
360p720p1080p4K
string[]
参照画像 URL の配列. 最大
10 件. 省略時はテキスト→動画になります. 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 タスクでは必須です.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
string
タスク ID. ステータス照会に使用します.
string
オブジェクト種別. 通常は
generation.task.string
使用されたモデル名.
string
タスク状態:
queued, in_progress, completed, failed.integer
タスク作成タイムスタンプ.
string
タスク完了後の生成動画 URL.
Examples
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"
}'
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 秒. 出力は元動画に延長部分を連結したものです):
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"}
}'
{
"id": "video_01JZEXAMPLE",
"object": "generation.task",
"model": "gemini-omni-1.1-flash-preview-official",
"status": "queued",
"created_at": 1779247407
}
タスクの照会
送信レスポンスはタスク ID を返します. 共通の動画タスク照会エンドポイントで状態と結果を取得します:curl --request GET \
--url https://toapis.com/v1/videos/generations/{task_id} \
--header "Authorization: Bearer YOUR_API_KEY"