Skip to main content
POST

Authentication

string
required
All endpoints require authentication with a Bearer token.Get an API key:Visit the API Key management page to get your API key.Add it to the request header:

Request parameters

string
required
Video generation model name. Must be gemini-omni-1.1-flash.
string
Text instructions. For text-to-video, describe the scene. For image-to-video, video editing, or extension, describe the motion, style, or requested edit.
Provide at least one of prompt or media (image_urls, first/last frame images, or video_urls).
string
default:"720p"
Output video resolution. Values are case-insensitive.Available values:
  • 360p
  • 720p (default)
  • 1080p
  • 4k
2160p is treated as 4k. The resolution determines the task’s deposit tier and primary video output cost.
An unsupported resolution returns an invalid_resolution error.
string
default:"16:9"
Video aspect ratio, used to select landscape or portrait output.Supported:
  • 16:9 - Landscape (default)
  • 9:16 - Portrait
Other values are treated as 16:9.
When video_urls is provided, the output usually follows the input video’s aspect ratio, so aspect_ratio may not take effect.
array<string>
Reference image array. Only publicly accessible HTTP/HTTPS URLs are supported.
  • Provide 1 image: used as the video’s starting frame by default
  • Provide multiple images: used as multi-subject or style references; describe each image’s purpose and relationships in prompt
image_urls and first/last frame images can contain at most 10 images in total.
string
First-frame image. Only publicly accessible HTTP/HTTPS URLs are supported.
  • Provided alone: uses the image as the video’s starting frame
  • Provided with last_frame_image: generates a video that transitions smoothly from the first frame to the last frame
string
Last-frame image. Only publicly accessible HTTP/HTTPS URLs are supported, and it must be provided with first_frame_image.
Providing only last_frame_image returns an invalid_frame_images error. Use the same aspect ratio for both frame images and match it to aspect_ratio.
For first-frame or first-and-last-frame generation, the following methods have the same effect. Choose one; do not provide both:
  • Use first_frame_image / last_frame_image
  • Use image_with_roles with role set to first_frame / last_frame
array<object>
Image array with roles. It is an equivalent alternative to first_frame_image / last_frame_image and can also declare reference images.Example:
If image_urls is also provided, it takes precedence for reference images and is not combined with references in image_with_roles. All effective images, including first and last frames, are limited to 10 in total.
array<string>
Array of videos to edit or extend. Currently, at most one video can be provided, and it must be no longer than 10 seconds.Only publicly accessible direct HTTP/HTTPS video URLs are supported. YouTube links are not supported.
video_urls and extend_from_task_id are mutually exclusive. Provide only one.
object
Additional parameters used to explicitly specify the generation intent.
For first-and-last-frame interpolation, the model infers the task automatically and the platform does not pass metadata.task.
string
The local task_id of the previous generation task. Use it for conversational editing or further extension without re-uploading the previous video.The referenced task must belong to the current user, have succeeded, and be a Gemini Omni model task.
extend_from_task_id and video_urls are mutually exclusive. Provide only one.
This model has no duration parameter. The model determines each output’s duration from the content, typically 3–10 seconds. To control pacing, describe it in prompt using natural language or time ranges.

Response

integer
Response status code. 200 indicates success.
array
Returned task array.

Query task result

Video generation is asynchronous. After submission returns a task_id, use Get task status to query progress and results.
cURL
Poll every 5–10 seconds and stop when the status becomes completed or failed. Set the overall client timeout to 10 minutes.

Successful result example

Use cases

Use case 1: Text-to-video (4K)

Use case 2: First-and-last-frame interpolation

Use case 3: Multi-subject references

Use case 4: Declare first and last frames with image roles

Use case 5: Video editing

Use short, specific prompts for video editing. To change only one part, add Keep everything else the same to preserve consistency elsewhere.

Use case 6: Conversational extension