Skip to content

Gemini Omni Flash 视频生成

使用 DragonAPI 密钥和本站接口。示例中的 your-media.example 是占位地址,需替换为你自己的可访问素材或回调地址。协议、可用性与价格以当前模型说明和控制台为准。

使用 Gemini Omni Flash 生成或编辑视频,支持文本、最多 10 张参考图或最多 3 个输入视频

  • 通过 model 指定 gemini-omni-flash-preview-official
  • 支持文生视频、图像/参考图生视频和视频编辑
  • 最多支持 10 张参考图或 3 个输入视频;图片与视频不能混用
  • 视频最长 10 秒;Playground 提供 4 / 6 / 8 / 10 秒预设
  • 仅支持 720p 分辨率;支持 16:99:16 画幅
  • 异步任务接口,提交后使用任务 ID 查询结果

本文档仅适用于 gemini-omni-flash-preview-official。平台通过 Vertex AI Interactions API 调用它(使用 Service Account OAuth),而不是 Vertex AI Publisher Model 的 predictLongRunning 接口。它与旧版 gemini-omni-flash / gemini_omni_flash 是两个独立模型,不会改变旧模型的路由或参数。

请先通过图片上传 API上传本地图片,通过视频上传 API上传本地视频,再传入返回的 URL。不要直接传 base64 媒体数据。

Authorizations

Authorization

string · 必填

使用 Bearer Token 认证:

text
Authorization: Bearer YOUR_DRAGONAPI_KEY

Body

model

string · 必填 · 默认 gemini-omni-flash-preview-official

模型名称。使用 gemini-omni-flash-preview-official

prompt

string · 必填

视频生成提示词。

duration

integer · 可选 · 默认 6

视频时长(秒),最大为 10。Playground 提供 46810 秒预设。

aspect_ratio

string · 可选 · 默认 16:9

视频比例,支持:

  • 16:9 横屏
  • 9:16 竖屏

resolution

string · 可选 · 默认 720p

视频分辨率:

  • 720p 默认分辨率
  • 仅支持 720p,不接受 Veo 专属参数

image_urls

string[] · 可选

可选的参考图 URL 数组,最多 10 张。不传时为文生视频。不能与 video_list 同时使用。

video_list

object[] · 可选

可选的视频编辑输入,最多 3 个。每一项必须包含 video_url,例如 { "video_url": "https://your-media.example/input.mp4" }。支持 HTTPS URL、data URI 和平台上传后返回的视频 URL;后端下载的单个输入视频最大 50 MB。不能与 image_urls 同时使用。

metadata

object · 可选

可选的 Interactions 生成参数。支持 temperature0.02.0)、topP / top_p0.01.0)、candidateCount / candidate_countprevious_interaction_id,以及 tasktext_to_videoimage_to_videoreference_to_videoedit)。省略 task 时,平台不会擅自默认;由上游根据 prompt 和媒体推断。对 edit(或带参考视频且未显式指定非 edit 任务)路径,平台会省略 aspect_ratio,因为上游拒绝在 edit 的 response_format 中设置宽高比。

Response

id

string · 可选

任务 ID,用于查询任务状态。

object

string · 可选

对象类型,通常为 generation.task

model

string · 可选

使用的模型名称。

status

string · 可选

任务状态:queuedin_progresscompletedfailed

created_at

integer · 可选

任务创建时间戳。

video_url

string · 可选

任务完成后的生成视频 URL。

Examples

curl --request POST \
  --url https://newapi.dragon3api.com/v1/videos \
  --header 'Authorization: Bearer YOUR_DRAGONAPI_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-omni-flash-preview-official",
    "prompt": "一支蓝色按压瓶在纯白摄影棚中轻微转动,商业产品视频",
    "duration": 6,
    "aspect_ratio": "9:16",
    "resolution": "720p",
    "image_urls": ["https://your-media.example/reference.jpg"]
  }'

视频编辑示例:

bash
curl --request POST \
--url https://newapi.dragon3api.com/v1/videos \
--header 'Authorization: Bearer YOUR_DRAGONAPI_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "model": "gemini-omni-flash-preview-official",
  "prompt": "保留镜头运动,把白天场景改成雨夜",
  "duration": 8,
  "aspect_ratio": "16:9",
  "resolution": "720p",
  "video_list": [{"video_url": "https://your-media.example/input.mp4"}],
  "metadata": {"temperature": 1.0, "topP": 0.95}
}'
{
  "id": "video_01JZEXAMPLE",
  "object": "generation.task",
  "model": "gemini-omni-flash-preview-official",
  "status": "queued",
  "created_at": 1779247407
}

查询任务

提交接口会返回任务 ID。使用通用视频任务查询接口获取状态和结果:

bash
curl --request GET \
--url https://newapi.dragon3api.com/v1/videos/{task_id} \
--header "Authorization: Bearer YOUR_DRAGONAPI_KEY"

模型、价格与服务规则以当前控制台为准。