Who this is for
This guide is for developers who want to generate or edit video through the API. By the end you should be able to produce a first video from Python, the command line or REST, know where aspect ratio, resolution, duration and reference images are set, and know which features are not available.
What Gemini Omni 1.2 Flash is
The model ID is gemini-omni-1.2-flash. It is a multimodal model built for fast video generation, conversational editing and cinematic control[1]. It accepts text, image and video inputs and generates synchronized video with native audio up to 15 seconds long[1].
Two capabilities stand out:
- Multi-turn editing and extension. Through the Interactions API, you refine or extend a video in natural language over several turns, and the model keeps the rest of the scene while applying the change[1].
- Character consistency. Up to 6 reference images help characters and objects stay consistent across shots[1].
The older gemini-omni-1.1-flash stays available for a 4-week transition window. Effective December 3, 2026, requests to it automatically route to gemini-omni-1.2-flash with no code changes, and they are billed at the Gemini Omni 1.2 Flash rates[1]. Projects still using the 1.1 name can switch to the new ID ahead of that date.
Your first video: text to video
The official example uses the Python genai client. Call client.interactions.create with the model ID and a prompt. The result's interaction.output_video.data is base64-encoded video, which you decode and write to a file[1]:
import base64
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-omni-1.2-flash",
input="A marble rolling fast on a chain reaction style track, continuous smooth shot."
)
with open("marble.mp4", "wb") as f:
f.write(base64.b64decode(interaction.output_video.data))The command line works too. -m selects the model and --out sets the output file[1]:
gemini-api video "A marble rolling fast on a chain reaction style track, continuous smooth shot." \
-m gemini-omni-1.2-flash \
--out marble.mp4interaction.output_video is a convenience field available only in the SDKs. If you call the REST API directly, read the video from the steps array in the response[1]. The REST endpoint is https://generativelanguage.googleapis.com/v1beta/interactions. The request body sets the model in model and the prompt in input[1].
Set aspect ratio, resolution and duration
These three settings live in different places, so check each one:
- Aspect ratio: set
aspect_ratioto"9:16"for portrait video. Landscape 16:9 is the default[1]. - Resolution: set
resolutioninresponse_format. The options are360p,720p(the default),1080pand4k, and the last two are upscaled output[1]. - Duration: set
durationinresponse_formatto any whole second from 3 to 15. The default is 10 seconds, and the value overrides any length written in the prompt. A duration over 15 seconds returns an invalid argument error[1].
Image to video and first and last frames
For image to video, send a reference image together with the prompt. The model decides how to use the image, which suits product shots, illustrations or photographs. The page recommends high-resolution images and specific descriptions of camera movement, subject motion and environmental effects[1].
To control the start and end, put two images in the input list and describe the transition in the prompt. First and last frame interpolation supports durations from 3 to 10 seconds. Two frames with a duration over 10 seconds return an invalid argument error[1].
To keep a character or object consistent across shots, use subject reference. A request accepts up to 6 reference images, with up to 3 images per character and up to 2 characters[1].
The task parameter in video_config can set the mode to text_to_video, image_to_video, reference_to_video, edit or extend. Start with natural-language prompting. Use task only as a fallback when prompting does not select the intended mode[1]. Do not put control strings such as <FIRST_FRAME> or <IMAGE_REF_0> in prompts; they are deprecated[1].
Multi-turn editing and video extension
To edit a generated video, pass the previous_interaction_id with the follow-up prompt. You do not need to re-upload the video. The model remembers the earlier context, so details you did not mention are kept[1]. Simple prompts work best for editing. To keep everything else fixed, add 'Keep everything else the same'[1].
To edit your own video, upload it with the Files API. The clip must be 15 seconds or less[1].
Video extension appends a continuation at the end of a clip. The model uses the last 10 seconds of the input as context and adds 3 to 10 seconds per turn, 10 seconds by default, up to a total of 30 seconds. Extension cannot add content at the start or in the middle of a clip[1].
Retrieve large videos
For videos larger than 4MB, set delivery="uri" in response_format. The response contains a Google-hosted URI, which you poll until the video is ACTIVE before downloading it[1].
Limits
- System instructions, temperature,
top_p, stop sequences and negative prompt fields are not supported[1]. - Provisioned throughput, audio inputs or audio references, voice editing and YouTube videos as a media source are not supported[1].
- Reference videos work only when generating a new video, not when editing or extending. A clip of 11 to 15 seconds supports one reference video of up to 3 seconds[1].
- Every generated video carries a SynthID watermark. It is invisible to viewers but can be detected by software to verify origin[1].
- English is fully supported. Other languages have not been evaluated, so results may vary[1].
How to write prompts
To get one continuous scene, say so in the prompt, for example 'in a single continuous shot' and 'no scene cuts'[1]. To set the sound, describe it, such as 'Include calm background music'[1].
Next steps
The page ends with a prompt guide covering single scenes, editing and audio[1].
Sources
- 1Generate and edit videos with Gemini Omni FlashGoogle AI for Developers
Cite this page: Generating video with the Gemini Omni 1.2 Flash API. TellWorld, https://www.tellworld.net/practice/practice-gemini-omni-1-2-flash-video. Updated 2026-11-15