APIMart
Gemini Omni 1.2 Flash model icon
Video

Gemini Omni 1.2 Flash API

Explore Gemini Omni 1.2 Flash API video controls with text, image references, first and last frames, or a source clip. Use the Gemini Omni API Playground to organize your prompt and output settings.

Multimodal videoFirst & last frames360p to 4K

Gemini Omni API overview

  • Text, reference images, and video inputs
  • 16:9 landscape or 9:16 portrait
  • 360p, 720p, 1080p, or 4K
Input

Describe a 3–10 second video and its sound in the prompt.

First / last frame
Reference Image

0/10 images, including first and last frames.

Reference videos

Up to 3 clips, each up to 3 seconds. Reference audio is ignored. YouTube links are not supported.

Output

Describe your scene and choose the video settings.

Plan video scenes with Gemini Omni 1.2 Flash

Build a brief for the Gemini Omni 1.2 Flash model using text, visual references, and frame directions. Choose each input’s role, then review the API settings and scene composition together.

Gemini Omni 1.2 Flash API examples: text and image to video

Prepare a video request, then use its task ID to query the result.

  1. 1

    Set up API authentication

    Save your APIMart API key in the APIMART_API_KEY environment variable and send it in the Authorization: Bearer header.

  2. 2

    Prepare and submit the video request

    POST model, prompt and the selected parameters to /v1/videos/generations. For image to video, add first_frame_image. Replace local file references with accessible HTTP(S) URLs; do not send blob URLs. Read data[0].task_id from the response.

  3. 3

    Query the video result

    Use GET /v1/tasks/{task_id} to check status. When completed, read data.result.videos[0].url[0]; when failed, inspect error.message.

    See the APIMart API documentation for general API guidance.

POST /v1/videos/generations
curl -X POST https://api.apimart.ai/v1/videos/generations \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-1.2-flash",
    "prompt": "A six-second continuous shot of paper lanterns above a quiet lakeside market at dusk. The camera moves slowly forward, fabric sways in a gentle breeze, and soft water sounds accompany the scene.",
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'

gemini-omni-api parameters

ParameterTypeRequiredDefaultDescription
modelstringRequiredDefault: gemini-omni-1.2-flashThe configuration ID used on this page: gemini-omni-1.2-flash.
promptstringRequiredDefault: —Describe the subject, motion, camera, lighting and desired sound. Put the desired 3–10-second length in the prompt; there is no separate duration field.
aspect_ratiostringOptionalDefault: 16:9Video aspect ratio: 16:9 landscape or 9:16 portrait. Defaults to 16:9.
resolutionstringOptionalDefault: 720p360p, 720p, 1080p or 4k. Defaults to 720p; 1080p and 4k use upscaling.
image_urlsarrayOptionalDefault: []Reference image HTTP(S) URLs. Reference images, the first frame and the last frame share a total limit of 10 images.
first_frame_imagestringOptionalDefault: —HTTP(S) URL of the starting frame. Counts toward the shared 10-image limit.
last_frame_imagestringOptionalDefault: —HTTP(S) URL of the ending frame. Requires first_frame_image and counts toward the shared 10-image limit.
video_urlsarrayOptionalDefault: []Video HTTP(S) URLs: up to 3 reference clips of at most 3 seconds each, or 1 source clip of at most 10 seconds for edit or extend. YouTube links are not supported.
metadata.taskstringOptionalDefault: —Explicit task: text_to_video, image_to_video, reference_to_video, edit or extend. Omit metadata.task for automatic selection instead of sending the string auto.
previous_interaction_idstringOptionalDefault: —Optional identifier of an earlier interaction to continue its context. Use an existing interaction ID, not a task ID or a model name.