跳转到内容
主站 新闻 控制台

Omni Flash 视频 API

Google 将于 2026 年 12 月 5 日下线 Omni Flash 1.1、Veo 3.1 Fast 和 Veo 3.1 Quality。建议迁移到 Omni 1.2;Veo 3.1 Lite 不在本次下线范围。Google 官方公告。

Omni 视频模型统一使用异步接口:提交任务、轮询状态、下载成片。支持 OpenAI 兼容协议和 Gemini predictLongRunning 协议。

模型用途时长输入素材
omni-t2v文生视频4、6、8、10 秒不传图片
omni-i2v图生视频4、6、8、10 秒1 张首帧,或 2 张首帧+尾帧
omni-r2v参考图生视频8 秒1–3 张参考图
omni-v2v视频编辑1–10 秒1 个源视频,可带 0–2 张参考图
omni-40s长视频40 秒0–9 张参考图;omni_40s 为兼容别名

支持的画幅为 16:9 和 9:16。模型广场提供 360p、720p、1080p 等分辨率档位,具体以模型和渠道配置为准。

普通视频使用 POST /v1/videos;V2V 使用 POST /v1/videos/edits。

Terminal window
curl https://api.4allapi.com/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "omni-t2v",
"prompt": "雨夜霓虹街道,镜头平稳向前推进",
"duration": 8,
"aspect_ratio": "16:9",
"resolution": "720p"
}'

omni-i2v 使用 images 数组:传 1 张时作为首帧,传 2 张时按首帧、尾帧使用。omni-r2v 使用 1–3 张参考图。

{
"model": "omni-i2v",
"prompt": "人物自然转身,镜头缓慢推进",
"duration": 8,
"aspect_ratio": "9:16",
"resolution": "720p",
"images": ["https://cdn.example.com/first.png"]
}

V2V 的源视频字段是 video,参考图使用 input_reference。源视频和参考图也可以使用 multipart 上传。

{
"model": "omni-v2v",
"prompt": "保留人物动作和镜头,只把背景改成雨夜街道",
"duration": 8,
"video": {"url": "https://cdn.example.com/source.mp4"},
"input_reference": [{"image_url": "https://cdn.example.com/style.png"}]
}
{
"model": "omni-40s",
"prompt": "一段连续的电影感镜头",
"duration": 40,
"aspect_ratio": "16:9",
"resolution": "720p",
"images": ["https://cdn.example.com/reference.png"]
}
Terminal window
curl "https://api.4allapi.com/v1beta/models/omni-r2v:predictLongRunning?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instances": [{
"prompt": "参考图中的人物在雨夜街道行走",
"image": {"gcsUri": "https://cdn.example.com/ref-1.png", "mimeType": "image/png"},
"referenceImages": [
{"gcsUri": "https://cdn.example.com/ref-2.png", "mimeType": "image/png"}
]
}],
"parameters": {"durationSeconds": 8, "aspectRatio": "16:9", "resolution": "720p"}
}'

轮询 GET /v1/videos/{id} 或 GET /v1beta/operations/{name},完成后使用返回的结果地址下载视频。