gemini-omni-1.2-flash generates an MP4 with audio. It supports text-to-video, a first frame, a first and last frame, or 1 to 3 reference images. Output is 720p or 1080p, from 3 to 15 seconds.
The create request waits until the video is finished. Set the client timeout to at least 900 seconds. Prices are listed in the console.
Request fields
Do not send
mode. The images you send select the mode.
The clip length is the requested duration. A 1080p clip can be a fraction of a second shorter.
Text to video
Image to video
Image URLs are not accepted. Anhttps:// value returns 400 and creates no task. Send a data:image/...;base64,... URL, or upload a file with multipart. PNG, JPEG, and WebP are supported. The type written in the data URL must match the file. The prompt and images together must stay within 15 MB. Use multipart for larger images.
Content-Type yourself when uploading a file:
-F last_frame=@last.png for a first-and-last-frame clip. Repeat reference_images for each file. The first and last frames must both be files or both be data URLs. Reference images have the same rule.
Not supported
- Reference video.
- A first frame together with reference images. A last frame alone, or a last frame with reference images.
- Extend, 4K, and 360p.
Query
The create response is usually alreadycompleted. If it is not completed or failed, query every 10 seconds.
Download
The response is thevideo/mp4 file, not JSON. Range is supported.
Task is not completed yet, current status: NOT_START. Wait a few seconds and download the same id. Do not submit the generation again.
Errors
Invalid parameters return HTTP 400 and create no task. In JSON,seconds must be a string:
401 means the key is invalid. 403 means the quota is insufficient. 404
model_not_found means the current group does not include this model. A peak can return 5xx. failed is often a content check. Change the prompt or the images and submit again. Include the request id or the task id when asking for help.