For the complete documentation index, see llms.txt. This page is also available as Markdown.

Gemini Omni Flash Preview

This documentation is valid for the following list of our models:

  • google/gemini-omni-flash-preview

Model Overview

Gemini Omni Flash Preview is Google's multimodal video generation and editing model for text-to-video, image-to-video, reference-to-video, and edit workflows.

Setup your API Key

If you don't have an API key yet, use our Quickstart guide.

How to Make a Call

Step-by-Step Instructions

Generating a video involves sequentially calling two endpoints:

  • Create and submit a video generation task. The response contains a generation ID.

  • Poll the retrieval endpoint with that generation ID until the status is completed.

API Schemas

Create a video generation task and send it to the server

post
Body
modelstring · enumRequiredPossible values:
promptstring · min: 1Required

The text description of the scene, subject, or action to generate in the video.

image_urlstring · uriOptional

Image URL, gs:// URI, or base64 data URI. Used as the first frame for image_to_video unless the prompt tags it as a reference.

image_urlsstring · uri[] · max: 6Optional

Reference image URLs, gs:// URIs, or base64 data URIs. Use prompt tags such as <IMAGE_REF_0> to bind image roles.

video_urlstring · uriOptional

Video URL, gs:// URI, or base64 data URI for edit workflows.

audio_urlstring · uriOptional

Audio URL, gs:// URI, or base64 data URI for multimodal prompting.

previous_interaction_idstringOptional

Gemini Interactions API id from a previous Omni generation, used for conversational edits.

taskstring · enumOptional

Gemini Omni video task. Defaults are inferred from the supplied media inputs.

Possible values:
aspect_ratiostring · enumOptional

The aspect ratio of the generated video.

Possible values:
durationinteger · enumOptional

The length of the output video in seconds.

Default: 8Possible values:
deliverystring · enumOptional

Gemini Omni video response delivery mode.

Default: uriPossible values:
Responses
200

Successful response.

application/json
idstringRequired

The ID of the generated video.

Example: 60ac7c34-3224-4b14-8e7d-0aa0db708325
statusstring · enumRequired

The current status of the generation task.

Example: completedPossible values:
post/v2/video/generations
200

Successful response.

Retrieve the generated video from the server

Poll this endpoint with the generation_id returned by the submit request. When the status is completed, the response includes the generated video URL.

get
Authorizations
AuthorizationstringRequired

Bearer key

Query parameters
generation_idstringRequiredExample: <REPLACE_WITH_YOUR_GENERATION_ID>
Responses
200Success
application/json
idstringRequired

The ID of the generated video.

Example: 60ac7c34-3224-4b14-8e7d-0aa0db708325
statusstring · enumRequired

The current status of the generation task.

Example: completedPossible values:
get/v2/video/generations
200Success

Code Example

The examples submit a generation task and poll every 15 seconds until the final result is available.

Response

Last updated

Was this helpful?