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 Video Generation and Editing
Generate, edit or extend 3-10 second videos with official Gemini Omni 1.1 Flash Preview at four resolutions
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
}
- 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
string
required
Bearer token authentication:
Authorization: Bearer YOUR_API_KEY
Body
string
default:"gemini-omni-1.1-flash-preview-official"
required
Model name. Use
gemini-omni-1.1-flash-preview-official.string
required
Prompt describing the video to generate, edit, or extend.
integer
default:"6"
Video duration in seconds, integer
3-10. For extend tasks this is the continuation length, about 10 seconds when omitted.string
default:"16:9"
Aspect ratio:
16:9landscape9:16portrait
edit and extend tasks.string
default:"720p"
Video resolution:
360p720p1080p4K
string[]
Optional 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.object[]
Optional 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.object
Optional 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.generateAudio, negativePrompt and seed are not supported.
Response
string
Task ID used to query status.
string
Object type, usually
generation.task.string
The model name used.
string
Task status:
queued, in_progress, completed, failed.integer
Task creation timestamp.
string
Generated video URL once the task completes.
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 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"}
}'
{
"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"