Gemini Omni 1.1 Flash Video Generation
Google's official Gemini Omni 1.1 Flash all-in-one multimodal video generation model
All documentation/v1/videos/generations- Supports text-to-video, image-to-video, multi-subject references, first-and-last-frame interpolation, video editing, and extension
- Supports 360p / 720p / 1080p / 4K, 24fps, 3–10 second output with generated audio
- Asynchronous task API; query the generated result by task ID after submission
Request examples
curl --request POST \
--url https://openrouterapi.ru/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-omni-1.1-flash",
"prompt": "A marble rolling fast on a chain reaction style track, continuous smooth shot.",
"aspect_ratio": "16:9",
"resolution": "1080p"
}'Authentication
AuthorizationstringrequiredAll endpoints require authentication with a Bearer token.
Get an API key:
Visit the API Key management page to get your API key.
Add it to the request header:
Authorization: Bearer YOUR_API_KEYRequest parameters
modelstringrequiredVideo generation model name. Must be gemini-omni-1.1-flash.
nsfw_checkbooleandefault: falseWhether to run content moderation before submitting the video task.
true: useomni-moderation-latestto review prompts and input imagesfalseor omitted: do not send a moderation request, adding no moderation cost or latency (default)
promptstringText instructions. For text-to-video, describe the scene. For image-to-video, video editing, or extension, describe the motion, style, or requested edit.
Note
Provide at least one of
promptor media (image_urls, first/last frame images, orvideo_urls).
resolutionstringdefault: 720pOutput video resolution. Values are case-insensitive.
Available values:
360p720p(default)1080p4k
2160p is treated as 4k. The resolution determines the task's deposit tier and primary video output cost.
Warning
An unsupported resolution returns an
invalid_resolutionerror.
aspect_ratiostringdefault: 16:9Video aspect ratio, used to select landscape or portrait output.
Supported:
16:9- Landscape (default)9:16- Portrait
Other values are treated as 16:9.
Warning
When
video_urlsis provided, the output usually follows the input video's aspect ratio, soaspect_ratiomay not take effect.
image_urlsarray\Reference image array. Only publicly accessible HTTP/HTTPS URLs are supported.
- Provide 1 image: used as the video's starting frame by default
- Provide multiple images: used as multi-subject or style references; describe each image's purpose and relationships in
prompt
Warning
image_urlsand first/last frame images can contain at most 10 images in total.
first_frame_imagestringFirst-frame image. Only publicly accessible HTTP/HTTPS URLs are supported.
- Provided alone: uses the image as the video's starting frame
- Provided with
last_frame_image: generates a video that transitions smoothly from the first frame to the last frame
last_frame_imagestringLast-frame image. Only publicly accessible HTTP/HTTPS URLs are supported, and it must be provided with first_frame_image.
Warning
Providing only
last_frame_imagereturns aninvalid_frame_imageserror. Use the same aspect ratio for both frame images and match it toaspect_ratio.
Note
For first-frame or first-and-last-frame generation, the following methods have the same effect. Choose one; do not provide both:
- Use
first_frame_image/last_frame_image- Use
image_with_roleswithroleset tofirst_frame/last_frame
image_with_rolesarray\Image array with roles. It is an equivalent alternative to first_frame_image / last_frame_image and can also declare reference images.
image_with_roles element
urlstringrequiredA publicly accessible image HTTP/HTTPS URL.
rolestringrequiredImage role:
first_frame: First framelast_frame: Last frame; a first frame must also be presentreference: Reference image; other roles that are not first or last frame are also treated as references
Example:
[
{"url": "https://example.com/start.jpg", "role": "first_frame"},
{"url": "https://example.com/end.jpg", "role": "last_frame"}
]Note
If
image_urlsis also provided, it takes precedence for reference images and is not combined with references inimage_with_roles. All effective images, including first and last frames, are limited to 10 in total.
video_urlsarray\Array of videos to edit or extend. Currently, at most one video can be provided, and it must be no longer than 10 seconds.
Only publicly accessible direct HTTP/HTTPS video URLs are supported. YouTube links are not supported.
Warning
video_urlsandextend_from_task_idare mutually exclusive. Provide only one.
metadataobjectAdditional parameters used to explicitly specify the generation intent.
metadata fields
taskstringAvailable task types:
text_to_video: Text-to-videoimage_to_video: Image-to-videoreference_to_video: Reference-to-videoedit: Video editingextend: Video extension
If omitted, the system infers the task from the inputs and prompt.
Note
For first-and-last-frame interpolation, the model infers the task automatically and the platform does not pass
metadata.task.
extend_from_task_idstringThe local task_id of the previous generation task. Use it for conversational editing or further extension without re-uploading the previous video.
The referenced task must belong to the current user, have succeeded, and be a Gemini Omni model task.
Warning
extend_from_task_idandvideo_urlsare mutually exclusive. Provide only one.
Warning
This model has no
durationparameter. The model determines each output's duration from the content, typically 3–10 seconds. To control pacing, describe it inpromptusing natural language or time ranges.
Response
codeintegerResponse status code. 200 indicates success.
dataarrayReturned task array.
Array element
statusstringInitial task status. A successful submission returns submitted.
task_idstringUnique task identifier used to query task status and results.
Query task result
Video generation is asynchronous. After submission returns a task_id, use Get task status to query progress and results.
curl --request GET \
--url https://openrouterapi.ru/v1/tasks/task_01KS1H7ZYSJWH1N779S2FSHTKA \
--header 'Authorization: Bearer <token>'Poll every 5–10 seconds and stop when the status becomes completed or failed. Set the overall client timeout to 10 minutes.
Successful result example
{
"code": 200,
"data": {
"id": "task_01KS1H7ZYSJWH1N779S2FSHTKA",
"status": "completed",
"progress": 100,
"cost": 1.52,
"credits_cost": 15.2,
"result": {
"videos": [
{
"url": ["https://cdn.example.com/gemini_omni_xxx.mp4"],
"expires_at": 1788518400
}
]
}
}
}Use cases
Use case 1: Text-to-video (4K)
{
"model": "gemini-omni-1.1-flash",
"prompt": "a blue butterfly landing on a flower, macro, soft light, no dialogue",
"aspect_ratio": "9:16",
"resolution": "4k"
}Use case 2: First-and-last-frame interpolation
{
"model": "gemini-omni-1.1-flash",
"prompt": "smooth transition, camera slowly pushes in",
"first_frame_image": "https://example.com/start.jpg",
"last_frame_image": "https://example.com/end.jpg",
"resolution": "720p"
}Use case 3: Multi-subject references
{
"model": "gemini-omni-1.1-flash",
"prompt": "the cat playfully bats at the ball of yarn",
"image_urls": [
"https://example.com/cat.png",
"https://example.com/yarn.png"
],
"resolution": "720p"
}Use case 4: Declare first and last frames with image roles
{
"model": "gemini-omni-1.1-flash",
"prompt": "a smooth cinematic transition from sunrise to a starry night",
"image_with_roles": [
{"url": "https://example.com/sunrise.jpg", "role": "first_frame"},
{"url": "https://example.com/night.jpg", "role": "last_frame"}
],
"resolution": "1080p"
}Use case 5: Video editing
{
"model": "gemini-omni-1.1-flash",
"prompt": "Make the violin invisible. Keep everything else the same.",
"video_urls": ["https://example.com/clip.mp4"]
}Use short, specific prompts for video editing. To change only one part, add Keep everything else the same to preserve consistency elsewhere.
Use case 6: Conversational extension
{
"model": "gemini-omni-1.1-flash",
"prompt": "Extend this video: the camera pans across the mountains.",
"extend_from_task_id": "task_01AAA"
}Responses
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01KS1H7ZYSJWH1N779S2FSHTKA"
}
]
}Models using this endpoint
Found a problem in these docs? Email support@openrouterapi.ru.