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.
Gemini Omni API overview
Describe a 3–10 second video and its sound in the prompt.
Describe your scene and choose the video settings.
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.
Prepare a video request, then use its task ID to query the result.
Save your APIMart API key in the APIMART_API_KEY environment variable and send it in the Authorization: Bearer header.
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.
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.
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"
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"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"
}
resp = requests.post(f"{API_BASE}/v1/videos/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
for _ in range(200):
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
print(task["result"]["videos"][0]["url"][0])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(10)
else:
raise TimeoutError(f"task {task_id} did not finish in time; continue GET polling with this task ID")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": "Animate this product image with a slow camera orbit and soft moving light. Preserve the product shape, label text and material.",
"aspect_ratio": "16:9",
"resolution": "720p",
"first_frame_image": "https://example.com/first-frame.jpg"
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | Default: gemini-omni-1.2-flash | The configuration ID used on this page: gemini-omni-1.2-flash. |
prompt | string | Required | Default: — | 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_ratio | string | Optional | Default: 16:9 | Video aspect ratio: 16:9 landscape or 9:16 portrait. Defaults to 16:9. |
resolution | string | Optional | Default: 720p | 360p, 720p, 1080p or 4k. Defaults to 720p; 1080p and 4k use upscaling. |
image_urls | array | Optional | Default: [] | Reference image HTTP(S) URLs. Reference images, the first frame and the last frame share a total limit of 10 images. |
first_frame_image | string | Optional | Default: — | HTTP(S) URL of the starting frame. Counts toward the shared 10-image limit. |
last_frame_image | string | Optional | Default: — | HTTP(S) URL of the ending frame. Requires first_frame_image and counts toward the shared 10-image limit. |
video_urls | array | Optional | Default: [] | 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.task | string | Optional | Default: — | 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_id | string | Optional | Default: — | Optional identifier of an earlier interaction to continue its context. Use an existing interaction ID, not a task ID or a model name. |
Prepare the inputs and visual direction for Google Gemini Omni 1.2 Flash.
Organize ideas, references, and editing instructions around your creative goal.
Build a consistent video brief in three steps.
Describe the subject, action, camera direction, and audio in your Gemini Omni brief. Include the desired pacing or approximate duration.
Select a task in the Gemini Omni API form. Add reference images or videos, first and last frames, or a source clip as appropriate.
Choose resolution and aspect ratio, then check your Gemini Omni prompt and assets together. Review image counts and video limits for the selected task. The page uses gemini-omni-1.2-flash as its configuration ID.
Task selection, media limits, output settings, and configuration editing.
Gemini Omni 1.2 Flash API offers automatic, text-to-video, image-to-video, reference-to-video, edit, and extend modes. Automatic leaves the task unspecified; choose edit or extend for source clips, and other modes for references.
For gemini-omni-api, describe the subject, action, camera, lighting, and sound. Add pacing, request a continuous shot if needed, and keep editing instructions focused on one intended change.
Gemini Omni API settings include 360p, 720p, 1080p, and 4K. The default is 720p; 1080p and 4K use upscaling. Use lowercase 4k in JSON.
Gemini-Omni API offers 16:9 landscape and 9:16 portrait, with 16:9 selected by default. Match reference compositions and first and last frames to the chosen aspect ratio.
Gemini Omni API uses prompt-guided duration for clips of approximately 3–10 seconds. Describe timing in words; there is no separate duration field, and an exact length is not guaranteed.
Gemini Omni Flash API counts reference images and frame images together, up to 10. Setting both frames leaves eight reference slots. Use the first-frame slot to assign an opening image.
Gemini Omni API accepts a first frame alone or paired with a last frame. A last frame requires a first. Reusing the same image can describe a loop, without guaranteeing seamlessness.
gemini-omni-1.2-flash API reference inputs allow three clips of up to three seconds each. Editing and extension use one source clip of up to 10 seconds. Select the corresponding task.
In Gemini-Omni Flash API prompts, editing describes a specific change to an existing clip. Extension describes what happens next, adding to the end rather than the beginning or middle.
Write dialogue, music, and sound directions in your Google Gemini Omni API prompt. Audio-file input and voice editing are unsupported. Reference-video sound is ignored, so describe desired audio separately.
The gemini-omni-api workspace accepts local video files or HTTP/HTTPS video-asset URLs within task limits. YouTube pages, short links, and embed URLs are not supported video sources.
In Gemini Omni Flash API configuration, previous_interaction_id is optional context for continued editing or extension. Use a valid earlier interaction ID, not a video URL. Leave it empty for new scenes.
The gemini-omni-1.2-flash API workspace exports Form settings to JSON and validates JSON before applying it back. Invalid edits remain in the editor, preserving both your text and previous form draft.
When changing Gemini Omni API tasks, check video count and duration. Incompatible inputs keep the current task and media unchanged. Adjust the clips first; existing content is not deleted automatically.
Gemini-Omni and gemini-omni-api are name or search variants, not separate models or request IDs. The page name is Gemini Omni 1.2 Flash; other search spellings include “Gemini Omni1.2 Flash” and “Gemini Omni Flash 1.2”. Its configuration ID is gemini-omni-1.2-flash.
Sign in to APIMart and open API Keys in the dashboard, or use Get API Key at the top of this page. Create and manage your API keys there, and keep them private.
Explore more models in the same category.

Pixverse V6 Max
PixVerse V6 Max is an advanced AI video generation model that transforms text and images into cinematic videos up to 15 seconds long at 1080p. With realistic visuals, expressive characters, and optional synchronized audio, it offers precise creative control for multi-shot storytelling, advertising, and music videos.

Kling V4
Kling 4.0 is an advanced AI video generation model that brings creative ideas to life with realistic motion, dynamic camera work, and precise visual control. With support for continuous videos up to 30 seconds and multiple reference inputs, it helps creators craft cinematic stories with greater flexibility.

ViduQ 4 Preview
Vidu Q4 Preview is ShengShu's image-to-video and reference-to-video model. Animate one first frame or combine up to 15 reference images and 3 audio clips into 3–16 second videos at up to 4K, with audio generated by default.

Wan 3.0 Video Prime
Wan 3.0 Prime is the Prime version of Alibaba Cloud's all-in-one Wan 3.0 video model, with general, first-and-last-frame and file or webpage modes and 2–30 second output.