Skip to content
הדף עדיין אינו זמין בשפה שלכם, ולכן הוא מוצג באנגלית.

Gemini Omni 1.1 Flash Video Generation

Google's official Gemini Omni 1.1 Flash all-in-one multimodal video generation model

כל התיעוד
POST/v1/videos/generations
  • Supports text-to-video, image-to-video, multi-subject references, first-and-last-frame interpolation, video editing, and extension
  • Supports 360p / 720p / 1080p / 4K, 24fps, 3–10 second output with generated audio
  • Asynchronous task API; query the generated result by task ID after submission

דוגמאות לבקשות

curl --request POST \
  --url https://api.apisea.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-omni-1.1-flash",
    "prompt": "A marble rolling fast on a chain reaction style track, continuous smooth shot.",
    "aspect_ratio": "16:9",
    "resolution": "1080p"
  }'

Authentication

Authorizationstringrequired

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:

text
Authorization: Bearer YOUR_API_KEY

Request parameters

modelstringrequired

Video generation model name. Must be gemini-omni-1.1-flash.

nsfw_checkbooleandefault: false

Whether to run content moderation before submitting the video task.

  • true: use omni-moderation-latest to review prompts and input images
  • false or omitted: do not send a moderation request, adding no moderation cost or latency (default)
promptstring

Text instructions. For text-to-video, describe the scene. For image-to-video, video editing, or extension, describe the motion, style, or requested edit.

Note

Provide at least one of prompt or media (image_urls, first/last frame images, or video_urls).

resolutionstringdefault: 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.

Warning

An unsupported resolution returns an invalid_resolution error.

aspect_ratiostringdefault: 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.

Warning

When video_urls is provided, the output usually follows the input video's aspect ratio, so aspect_ratio may not take effect.

image_urlsarray\

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

Warning

image_urls and first/last frame images can contain at most 10 images in total.

first_frame_imagestring

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
last_frame_imagestring

Last-frame image. Only publicly accessible HTTP/HTTPS URLs are supported, and it must be provided with first_frame_image.

Warning

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.

Note

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
image_with_rolesarray\

Image array with roles. It is an equivalent alternative to first_frame_image / last_frame_image and can also declare reference images.

image_with_roles element

urlstringrequired

A publicly accessible image HTTP/HTTPS URL.

rolestringrequired

Image role:

  • first_frame: First frame
  • last_frame: Last frame; a first frame must also be present
  • reference: Reference image; other roles that are not first or last frame are also treated as references

Example:

json
[
  {"url": "https://example.com/start.jpg", "role": "first_frame"},
  {"url": "https://example.com/end.jpg", "role": "last_frame"}
]

Note

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.

video_urlsarray\

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.

Warning

video_urls and extend_from_task_id are mutually exclusive. Provide only one.

metadataobject

Additional parameters used to explicitly specify the generation intent.

metadata fields

taskstring

Available task types:

  • text_to_video: Text-to-video
  • image_to_video: Image-to-video
  • reference_to_video: Reference-to-video
  • edit: Video editing
  • extend: Video extension

If omitted, the system infers the task from the inputs and prompt.

Note

For first-and-last-frame interpolation, the model infers the task automatically and the platform does not pass metadata.task.

extend_from_task_idstring

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.

Warning

extend_from_task_id and video_urls are mutually exclusive. Provide only one.

Warning

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

codeinteger

Response status code. 200 indicates success.

dataarray

Returned task array.

Array element

statusstring

Initial task status. A successful submission returns submitted.

task_idstring

Unique task identifier used to query task status and results.

Query task result

Video generation is asynchronous. After submission returns a task_id, use Get task status to query progress and results.

cURL
curl --request GET \
  --url https://api.apisea.ai/v1/tasks/task_01KS1H7ZYSJWH1N779S2FSHTKA \
  --header 'Authorization: Bearer <token>'

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

json
{
  "code": 200,
  "data": {
    "id": "task_01KS1H7ZYSJWH1N779S2FSHTKA",
    "status": "completed",
    "progress": 100,
    "cost": 1.52,
    "credits_cost": 15.2,
    "result": {
      "videos": [
        {
          "url": ["https://cdn.example.com/gemini_omni_xxx.mp4"],
          "expires_at": 1788518400
        }
      ]
    }
  }
}

Use cases

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

json
{
  "model": "gemini-omni-1.1-flash",
  "prompt": "a blue butterfly landing on a flower, macro, soft light, no dialogue",
  "aspect_ratio": "9:16",
  "resolution": "4k"
}

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

json
{
  "model": "gemini-omni-1.1-flash",
  "prompt": "smooth transition, camera slowly pushes in",
  "first_frame_image": "https://example.com/start.jpg",
  "last_frame_image": "https://example.com/end.jpg",
  "resolution": "720p"
}

Use case 3: Multi-subject references

json
{
  "model": "gemini-omni-1.1-flash",
  "prompt": "the cat playfully bats at the ball of yarn",
  "image_urls": [
    "https://example.com/cat.png",
    "https://example.com/yarn.png"
  ],
  "resolution": "720p"
}

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

json
{
  "model": "gemini-omni-1.1-flash",
  "prompt": "a smooth cinematic transition from sunrise to a starry night",
  "image_with_roles": [
    {"url": "https://example.com/sunrise.jpg", "role": "first_frame"},
    {"url": "https://example.com/night.jpg", "role": "last_frame"}
  ],
  "resolution": "1080p"
}

Use case 5: Video editing

json
{
  "model": "gemini-omni-1.1-flash",
  "prompt": "Make the violin invisible. Keep everything else the same.",
  "video_urls": ["https://example.com/clip.mp4"]
}

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

json
{
  "model": "gemini-omni-1.1-flash",
  "prompt": "Extend this video: the camera pans across the mountains.",
  "extend_from_task_id": "task_01AAA"
}

תגובות

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KS1H7ZYSJWH1N779S2FSHTKA"
    }
  ]
}

מצאתם בעיה בתיעוד? אפשר לשלוח אימייל לכתובת support@apisea.ai.