Gemini Omni 1.1 Video Generation and Editing
Generate, edit or extend 3-10 second videos with official Gemini Omni 1.1 Flash Preview at four resolutions
- Set
modeltogemini-omni-1.1-flash-preview-official - Supports text-to-video, image-to-video, reference-to-video, video editing and video extension
- Up to 10 reference images and up to 3 input videos; images and videos can be combined in one request
- Duration 3-10 seconds; resolutions 360p / 720p / 1080p / 4K
- Async task API; query results by task ID after submission
Users in mainland China can replace the example domain with https://toapis.cn.
Upload local images via the Image Upload API and local videos via the Video Upload API first, then pass the returned URLs. Do not pass base64 media data directly.
Authorizations
AuthorizationstringheaderrequiredBearer token authentication:
Authorization: Bearer YOUR_API_KEYBody
modelstringbodyrequireddefault: gemini-omni-1.1-flash-preview-officialModel name. Use gemini-omni-1.1-flash-preview-official.
promptstringbodyrequiredPrompt describing the video to generate, edit, or extend.
durationintegerbodydefault: 6Video duration in seconds, integer 3-10. For extend tasks this is the continuation length, about 10 seconds when omitted.
aspect_ratiostringbodydefault: 16:9Aspect ratio:
16:9landscape9:16portrait
Not sent for edit and extend tasks.
resolutionstringbodydefault: 720pVideo resolution:
360p720p1080p4K
image_urlsstring[]bodyOptional reference image URL array, up to 10 items. Omit for text-to-video. Can be combined with video_list, for example to attach reference images when extending a video.
video_listobject[]bodyOptional input videos, up to 3 items. Each object must contain video_url, for example { "video_url": "https://example.com/input.mp4" }. HTTPS URLs, data URIs, and platform-uploaded video URLs are supported. Each downloaded input video is limited to 50 MB, MP4/MOV. Can be combined with image_urls for mixed image-plus-video input. Required for edit and extend tasks.
metadataobjectbodyOptional Interactions generation controls. Supported keys include temperature (0.0–2.0), topP / top_p (0.0–1.0), candidateCount / candidate_count, previous_interaction_id, and task (text_to_video, image_to_video, reference_to_video, edit, or extend). When task is omitted, the platform does not invent a default; the upstream model infers the mode from the prompt and media. The platform omits aspect_ratio for edit and extend paths (or video inputs without an explicit task). extend continues a source video supplied through video_list and cannot be combined with previous_interaction_id.
Veo-specific parameters such as generateAudio, negativePrompt and seed are not supported.
Response
idstringTask ID used to query status.
objectstringObject type, usually generation.task.
modelstringThe model name used.
statusstringTask status: queued, in_progress, completed, failed.
created_atintegerTask creation timestamp.
video_urlstringGenerated video URL once the task completes.
Examples
requestExample
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"
}'Video editing example:
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"}
}'Video extension example (duration is the continuation length in seconds, about 10 when omitted; the output is the source video plus the continuation):
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"}
}'responseExample
{
"id": "video_01JZEXAMPLE",
"object": "generation.task",
"model": "gemini-omni-1.1-flash-preview-official",
"status": "queued",
"created_at": 1779247407
}Query Task
The generation endpoint returns a task ID. Use the common video task status endpoint to fetch status and results:
curl --request GET \
--url https://toapis.com/v1/videos/generations/{task_id} \
--header "Authorization: Bearer YOUR_API_KEY"