Skip to content
Trang này chưa có bản dịch sang ngôn ngữ của bạn, nên hiện đang được hiển thị bằng tiếng Anh.

Gemini Omni Flash Video Generation

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

Toàn bộ tài liệu
POST/v1/videos/generations
  • Supports Text-to-Video, Image-to-Video, and Video-to-Video (editing), with mixed text + image + video input
  • Outputs 720p / 24fps, 3-10 seconds, with audio; supports conversational multi-turn editing
  • Asynchronous task API. Submit a task first, then query the result by task ID

Ví dụ request

curl --request POST \
  --url https://api.apisea.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-omni-flash-preview",
    "prompt": "a red apple on a wooden table, short cinematic clip",
    "aspect_ratio": "16:9"
  }'

Authentication

Authorizationstringrequired

All requests require Bearer Token authentication.

Get an API key:

Visit the API Key management page to get your API key.

Add the following header when making requests:

text
Authorization: Bearer YOUR_API_KEY

Request Parameters

modelstringrequired

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

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)
promptstringrequired

Text instruction. For Text-to-Video, it is a scene description; for Image/Video-to-Video, it is an action / style / editing instruction.

Note

prompt and reference materials (image_urls / video_urls) — provide at least one of them.

image_urlsarray\

Reference images, up to 16. Each item is an http(s):// URL.

Supports JPEG / PNG. For multiple subjects (e.g. "cat + ball of yarn"), you can pass multiple images and describe how they interact in the prompt.

video_urlsarray\

Reference / video to be edited, at most 1 (multiple video references are not supported). Can be an http(s):// direct link or data:video/....

Warning

  • Reference videos are 1-24 seconds; the official recommendation is ≤3 seconds.
  • video_urls and extend_from_task_id are mutually exclusive; provide only one of them, not both at the same time.
aspect_ratiostringdefault: 16:9

Video aspect ratio, which actually controls the output frame orientation.

Warning

When video_urls is provided, the aspect_ratio parameter has no effect.

Supported values only:

  • 16:9 - landscape (default)
  • 9:16 - portrait

Other values are treated as 16:9.

resolutionstringdefault: 720p

Video resolution. Currently only 720p is supported.

extend_from_task_idstring

Previous task ID: fill in the ** task_id** of the previous generation task.

Warning

extend_from_task_id and video_urls are mutually exclusive; provide only one of them, not both at the same time.

Response

codeinteger

Response status code. Successful requests return 200.

dataarray

Returned task array.

Array item

statusstring

Initial task status. It is submitted after successful submission.

task_idstring

Unique task ID for querying task status and result.

Query Task Result

Video generation is asynchronous. After submission, the API returns a task_id. Use the Get task status endpoint to query progress and results.

Successful Result Example

json
{
  "code": 200,
  "data": {
    "id": "task_01KS1H7ZYSJWH1N779S2FSHTKA",
    "status": "completed",
    "progress": 100,
    "created": 1779246294,
    "completed": 1779246334,
    "actual_time": 40,
    "estimated_time": 60,
    "cost": 1.0,
    "credits_cost": 10,
    "result": {
      "videos": [
        {
          "url": ["https://cdn.example.com/gemini_omni_xxx.mp4"],
          "expires_at": 1779332760
        }
      ]
    }
  }
}

Use Cases

Scenario 1: Text-to-Video

json
{
  "model": "gemini-omni-flash-preview",
  "prompt": "a blue butterfly landing on a flower, macro, soft light",
  "aspect_ratio": "9:16"
}

Scenario 2: Image-to-Video

json
{
  "model": "gemini-omni-flash-preview",
  "prompt": "turn this drawing into realistic footage, use it only as a motion guide",
  "image_urls": ["https://example.com/sketch.jpg"]
}

Scenario 3: Video-to-Video

json
{
  "model": "gemini-omni-flash-preview",
  "prompt": "when the person touches the mirror, make it ripple like liquid",
  "video_urls": ["https://example.com/clip.mp4"]
}

Phản hồi

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

Phát hiện lỗi trong tài liệu này? Gửi email đến support@apisea.ai.