Skip to content

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:

text
POST https://api.exchangetoken.ai/v1beta/interactions

Use your Exchange Token API key in either of the following authentication headers:

http
x-goog-api-key: YOUR_API_KEY
http
Authorization: Bearer YOUR_API_KEY

Content-Type Header:

http
Content-Type: application/json

Request Body

The request body follows the Interactions create schema. The examples below use these common fields:

FieldTypeRequiredDescription
modelstringYesModel name. Use gemini-omni-flash-preview.
inputstring, content object, or content arrayYesMain interaction input. Use a string for text-to-video, or an array for multimodal image/video editing input.
input[].typestringConditionalContent item type, such as text, image, video, or user_input.
input[].textstringConditionalText prompt when type is text.
input[].datastringConditionalBase64-encoded media bytes for image or video inputs.
input[].mime_typestringConditionalMIME type for media inputs, such as image/jpeg, image/png, or video/mp4.
input[].contentarrayConditionalNested content array when using a user_input wrapper.
response_formatobjectNoOutput format options. Use {"type":"video"} for video output.
response_format.typestringNoOutput type. For this model, use video.
response_format.aspect_ratiostringNoVideo aspect ratio. Supported values used in examples: 16:9 and 9:16.
generation_configobjectNoGeneration options.
generation_config.video_config.taskstringNoOptional video task hint. Supported values: text_to_video, image_to_video, reference_to_video, edit.

Response Body

Common fields:

FieldTypeDescription
idstringUnique identifier of the interaction
objectstringResource type identifier, typically interaction
statusstringCurrent interaction status, such as in_progress, completed, or failed
rolestringRole associated with the response payload, typically model
createdstringInteraction creation time in ISO 8601 format
updatedstringLast interaction update time in ISO 8601 format
modelstringName of the model used for the interaction
stepsarrayOrdered step objects returned by the interaction
usageobjectToken usage summary for the interaction when provided by upstream

Common steps fields:

FieldTypeDescription
typestringStep type, for example model_output
contentarrayContent items carried by the step

Example:

json
{
  "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.

bash
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.

bash
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.

bash
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.

bash
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_video
  • image_to_video
  • reference_to_video
  • edit
bash
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.

bash
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" }
  }'