Gemini Omni Flash Video API
Gemini Omni Flash is a high-performance multimodal model for fast video generation, editing, and cinematic control. It can use text, images, audio, and video together, supports conversational editing through the Interactions API, and can apply Gemini world knowledge to physical scenes and storytelling.
Calling Method
Endpoint and Authentication
Use the Gemini-compatible Interactions endpoint:
POST https://api.exchangetoken.ai/v1beta/interactionsUse your Exchange Token API key in either of the following authentication headers:
x-goog-api-key: YOUR_API_KEYAuthorization: Bearer YOUR_API_KEYContent-Type Header:
Content-Type: application/jsonRequest Body
The request body follows the Interactions create schema. The examples below use these common fields:
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model name. Use gemini-omni-flash-preview. |
input | string, content object, or content array | Yes | Main interaction input. Use a string for text-to-video, or an array for multimodal image/video editing input. |
input[].type | string | Conditional | Content item type, such as text, image, video, or user_input. |
input[].text | string | Conditional | Text prompt when type is text. |
input[].data | string | Conditional | Base64-encoded media bytes for image or video inputs. |
input[].mime_type | string | Conditional | MIME type for media inputs, such as image/jpeg, image/png, or video/mp4. |
input[].content | array | Conditional | Nested content array when using a user_input wrapper. |
response_format | object | No | Output format options. Use {"type":"video"} for video output. |
response_format.type | string | No | Output type. For this model, use video. |
response_format.aspect_ratio | string | No | Video aspect ratio. Supported values used in examples: 16:9 and 9:16. |
generation_config | object | No | Generation options. |
generation_config.video_config.task | string | No | Optional video task hint. Supported values: text_to_video, image_to_video, reference_to_video, edit. |
Response Body
Common fields:
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier of the interaction |
object | string | Resource type identifier, typically interaction |
status | string | Current interaction status, such as in_progress, completed, or failed |
role | string | Role associated with the response payload, typically model |
created | string | Interaction creation time in ISO 8601 format |
updated | string | Last interaction update time in ISO 8601 format |
model | string | Name of the model used for the interaction |
steps | array | Ordered step objects returned by the interaction |
usage | object | Token usage summary for the interaction when provided by upstream |
Common steps fields:
| Field | Type | Description |
|---|---|---|
type | string | Step type, for example model_output |
content | array | Content items carried by the step |
Example:
{
"id": "v1_...",
"status": "completed",
"role": "model",
"created": "2026-05-27T06:15:03Z",
"updated": "2026-05-27T06:15:03Z",
"steps": [
{
"content": [
{
"text": "",
"type": "text"
}
],
"type": "model_output"
},
{
"content": [
{
"mime_type": "video/mp4",
"data": "AAAAIGZ0eXBpc29t...",
"type": "video"
}
],
"type": "model_output"
}
],
"object": "interaction",
"model": "gemini-omni-flash-preview"
}Text to Video
Generate a video with audio from a text prompt. For best results, describe the scene, camera movement, lighting, mood, and key actions.
curl -X POST "https://api.exchangetoken.ai/v1beta/interactions" \
-H "x-goog-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": "A marble rolling fast on a chain reaction style track, continuous smooth shot."
}'Control Aspect Ratio
Set response_format.aspect_ratio to 9:16 for portrait video. The default is landscape 16:9.
curl -X POST "https://api.exchangetoken.ai/v1beta/interactions" \
-H "x-goog-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": "A futuristic city with neon lights and flying cars, cyberpunk style",
"response_format": {
"type": "video",
"aspect_ratio": "9:16"
}
}'Image to Video
Provide one or more reference images with your text prompt. The model decides how to use the images based on the prompt. This is useful for bringing product shots, illustrations, or photographs to life.
curl -X POST "https://api.exchangetoken.ai/v1beta/interactions" \
-H "x-goog-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": [
{ "type": "image", "data": "'"$BASE64_IMAGE"'", "mime_type": "image/jpeg" },
{ "type": "text", "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video" }
]
}'TIP
For image-to-video, use high-resolution images and provide specific motion descriptions. Vague prompts such as "make it move" are usually less effective than detailed camera, subject, and environment instructions.
Subject Reference
You can provide multiple images as subject references. For example, pass a cat image and a yarn image to generate a video of the cat playing with the yarn.
curl -X POST "https://api.exchangetoken.ai/v1beta/interactions" \
-H "x-goog-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": [
{ "type": "image", "data": "'"$CAT_B64"'", "mime_type": "image/png" },
{ "type": "image", "data": "'"$YARN_B64"'", "mime_type": "image/png" },
{ "type": "text", "text": "A cat playfully batting at a ball of yarn." }
]
}'Task Parameter
Use generation_config.video_config.task to clarify the intended behavior. If it is omitted, the model infers the task from the prompt.
Allowed values:
text_to_videoimage_to_videoreference_to_videoedit
curl -X POST "https://api.exchangetoken.ai/v1beta/interactions" \
-H "x-goog-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": [
{ "type": "image", "data": "'"$BASE64_IMAGE"'", "mime_type": "image/jpeg" },
{ "type": "text", "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video" }
],
"generation_config": {
"video_config": {
"task": "image_to_video"
}
}
}'Edit Your Own Videos
Upload or provide a video, then ask Gemini Omni Flash to edit it.
VIDEO_B64=$(base64 -w 0 "$VIDEO_FILE")
curl -sS -w "\n[HTTP %{http_code}]\n" "https://api.exchangetoken.ai/v1beta/interactions" \
-H "x-goog-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": [
{
"type": "user_input",
"content": [
{
"type": "video",
"mime_type": "video/mp4",
"data": "'"$VIDEO_B64"'"
},
{
"type": "text",
"text": "When the person touches the mirror, make the mirror ripple beautifully like liquid, and the person arm turns into reflective mirror material"
}
]
}
],
"response_format": { "type": "video" }
}'