Gemini Omni Flash
Gemini Omni 1.2 普通版
普通版支持文生视频和图生视频, 4-15 秒时长 / 720p. 最多使用 5 张参考图, 支持首尾帧.
普通版支持文生视频和图生视频, 4-15 秒时长 / 720p. 最多使用 5 张参考图, 支持首尾帧.
使用平台 API Key, 不使用上游供应商 Key. 中国大陆可将 Base URL 换为 https://toapis.cn.
请求参数
Authorizationstring请求头必填Bearer YOUR_API_KEY
modelstring请求体必填gemini-omni-1.2-flash-preview
promptstring请求体必填必填的视频描述.
durationinteger请求体默认值: 10视频时长 4-15 秒, 不传默认 10 秒.
resolutionstring请求体默认值: 720p720p
aspect_ratiostring请求体默认值: 16:9支持 16:9 或 9:16, 默认 16:9.
image_urlsstring[]请求体最多 5 张公开图片 URL, 用作参考图.
first_image_urlstring请求体首帧图片的公开 URL.
last_image_urlstring请求体尾帧图片的公开 URL.
本地素材先通过上传接口获得公网 URL. 请勿发送 base64, data URI 或本地文件路径. 不支持视频输入.
请求示例
curl https://toapis.com/v1/videos \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gemini-omni-1.2-flash-preview",
"prompt": "A cinematic tracking shot through a sunlit city",
"duration": 10,
"resolution": "720p",
"aspect_ratio": "16:9",
"image_urls": ["https://example.com/image.png"]
}'首尾帧示例
curl https://toapis.com/v1/videos \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gemini-omni-1.2-flash-preview",
"prompt": "根据首尾帧生成视频",
"duration": 6,
"first_image_url": "https://example.com/first.png",
"last_image_url": "https://example.com/last.png"
}'查询结果
提交返回平台任务 id. 通过 GET /v1/videos/{id} 查询, 完成后读取视频结果. 不要使用供应商 task_id 或直接访问供应商查询接口.
curl https://toapis.com/v1/videos/YOUR_TASK_ID \
-H 'Authorization: Bearer YOUR_API_KEY'响应示例
{
"id": "vid_example",
"object": "generation.task",
"model": "gemini-omni-1.2-flash-preview",
"status": "queued",
"created_at": 1789600000
}