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
API Schemas
Create a video generation task and send it to the server
The text description of the scene, subject, or action to generate in the video.
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.
Reference image URLs, gs:// URIs, or base64 data URIs. Use prompt tags such as <IMAGE_REF_0> to bind image roles.
Video URL, gs:// URI, or base64 data URI for edit workflows.
Audio URL, gs:// URI, or base64 data URI for multimodal prompting.
Gemini Interactions API id from a previous Omni generation, used for conversational edits.
Gemini Omni video task. Defaults are inferred from the supplied media inputs.
The aspect ratio of the generated video.
The length of the output video in seconds.
8Possible values: Gemini Omni video response delivery mode.
uriPossible values: Successful response.
The ID of the generated video.
60ac7c34-3224-4b14-8e7d-0aa0db708325The current status of the generation task.
completedPossible values: curl --request POST \
--url 'https://api.aimlapi.com/v2/video/generations' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
--header 'Content-Type: application/json' \
--data '{"model": "google/gemini-omni-flash-preview", "prompt": "Describe what you want the model to generate.", "image_url": "https://example.com/input.jpg", "duration": "8"}'Successful response.
{
"id": "60ac7c34-3224-4b14-8e7d-0aa0db708325",
"status": "completed",
"video": {
"url": "https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4"
},
"error": {
"name": "text",
"message": "text"
},
"meta": {
"usage": {
"credits_used": 120000,
"usd_spent": 0.06
}
}
}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.
Bearer key
<REPLACE_WITH_YOUR_GENERATION_ID>The ID of the generated video.
60ac7c34-3224-4b14-8e7d-0aa0db708325The current status of the generation task.
completedPossible values: curl -L \
--request GET \
--url 'https://api.aimlapi.com/v2/video/generations?generation_id=<REPLACE_WITH_YOUR_GENERATION_ID>' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>'{
"id": "60ac7c34-3224-4b14-8e7d-0aa0db708325",
"status": "completed",
"video": {
"url": "https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4"
},
"error": {
"name": "text",
"message": "text"
},
"meta": {
"usage": {
"credits_used": 120000
}
}
}Code Example
The examples submit a generation task and poll every 15 seconds until the final result is available.
Last updated
Was this helpful?