使用 Gemini Omni 1.1 Flash 生成视频,并在提示词中通过标签引用多张图像和短视频片段。免费试用——按次生成付费。
关于此模型
Gemini Omni 1.1 Flash 参考图生视频会根据提示词生成新视频,提示词可直接通过标签引用参考媒体——最多 7 张参考图像和最多 3 个短参考视频片段(每个最长 3 秒),并按照 URL 列出的顺序在提示词中使用 <IMAGE_REF_0>、<VIDEO_REF_0> 等标签。这样,单条提示词就能组合多个不同的视觉和运动参考,而无需僵化的配额系统。若要使用单视频编辑流程,请参阅 Gemini Omni 1.1 Flash 视频编辑。若要使用参考图像、语音和 character IDs 进行文生视频,请参阅 Gemini Omni 1.1 Flash。若要进行关键帧驱动的图生视频,请参阅 Gemini Omni 1.1 Flash 图生视频。
成本分析
| 提供商 | 费用 | 备注 |
|---|---|---|
| muapi | $0.048–$0.48 按输出秒数计费 (by 分辨率) | 按次生成, 无需订阅. Combine up to 7 reference images and 3 short reference video clips in one call. |
| Fal.ai | 可比的按秒定价 | 相同的底层模型(google/gemini-omni-flash/v1.1/reference-to-video)。 |
| Replicate | 暂不可用 | Gemini Omni 1.1 Flash Reference to Video is 未在 Replicate. |
按次生成, 无需订阅. Combine up to 7 reference images and 3 short reference video clips in one call.
相同的底层模型(google/gemini-omni-flash/v1.1/reference-to-video)。
Gemini Omni 1.1 Flash Reference to Video is 未在 Replicate.
** 竞品价格根据相似模型架构和使用层级估算。
配置参数
| 参数 | 类型 | 描述 | 默认值 |
|---|---|---|---|
| 提示词 | string | 描述视频的文本提示词。参考媒体按列表顺序在提示词中引用,例如 <IMAGE_REF_0>、<VIDEO_REF_0>。 | A cat inspired by <IMAGE_REF_0> walks through the setting in <VIDEO_REF_0>. |
| 参考图像 | array | URLs of 参考图像 to incorporate into the video, referenced in the prompt as <IMAGE_REF_0>, <IMAGE_REF_1>, etc. | - |
| 参考视频 | array | 最多 3 reference video clips, each at most 3 seconds long, referenced in the prompt as <VIDEO_REF_0>, <VIDEO_REF_1>, etc. | - |
| 画面比例 | 枚举(2 个选项) | 输出视频的画面比例。 | 16:9 |
| 分辨率 | 枚举(4 个选项) | Output resolution. Billed per second of 生成的视频: $0.048/s at 360p, $0.16/s at 720p, $0.24/s at 1080p, $0.48/s at 4K. | 720p |
| 时长(秒) | int | Duration of the 生成的视频, (秒). | 8 |
描述视频的文本提示词。参考媒体按列表顺序在提示词中引用,例如 <IMAGE_REF_0>、<VIDEO_REF_0>。
A cat inspired by <IMAGE_REF_0> walks through the setting in <VIDEO_REF_0>.URLs of 参考图像 to incorporate into the video, referenced in the prompt as <IMAGE_REF_0>, <IMAGE_REF_1>, etc.
-最多 3 reference video clips, each at most 3 seconds long, referenced in the prompt as <VIDEO_REF_0>, <VIDEO_REF_1>, etc.
-输出视频的画面比例。
16:9Output resolution. Billed per second of 生成的视频: $0.048/s at 360p, $0.16/s at 720p, $0.24/s at 1080p, $0.48/s at 4K.
720pDuration of the 生成的视频, (秒).
8开发者文档
收集参考媒体
最多提供 7 张参考图像(image_urls)和最多 3 个参考视频片段(reference_video_urls,每个最长 3 秒)。
编写通过标签引用每个参考的提示词
参考媒体在提示词中的引用顺序与列表顺序一致:第一张图像是 <IMAGE_REF_0>,第二张是 <IMAGE_REF_1>,依此类推;第一个视频是 <VIDEO_REF_0>,以此类推。示例:'A cat inspired by <IMAGE_REF_0> walks through the setting in <VIDEO_REF_0>.'
选择时长、分辨率和宽高比 时长为 3–10 秒(默认为 8)。分辨率按秒计费:360p 为 $0.048/s,720p 为 $0.16/s,1080p 为 $0.24/s,4K 为 $0.48/s。
提交并轮询
curl -X POST https://api.muapi.ai/api/v1/gemini-omni-flash-1-1-reference-to-video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A cat inspired by <IMAGE_REF_0> walks through the setting in <VIDEO_REF_0>.",
"image_urls": ["https://example.com/cat.jpg"],
"reference_video_urls": ["https://example.com/setting.mp4"],
"resolution": "1080p"
}'
然后轮询 GET /api/v1/predictions/{request_id}/result,直到 status 为 completed。
提示词技巧
<IMAGE_REF_0> 始终对应 image_urls 中的第一项。常见问答
它会根据提示词生成新视频;提示词通过标签——`<IMAGE_REF_0>`、`<VIDEO_REF_0>` 等——引用参考图像和短参考视频片段,并在一次请求中组合最多 7 张图像和 3 个视频片段。
参考媒体按 URL 列出的顺序进行引用:第一个 `image_urls` 项是 `<IMAGE_REF_0>`,第二个是 `<IMAGE_REF_1>`,依此类推;第一个 `reference_video_urls` 项是 `<VIDEO_REF_0>`,以此类推。请直接在 `prompt` 文本中使用这些标签。
每个参考视频片段最长为 3 秒,每次请求最多可提供 3 个参考视频。
根据生成视频的分辨率按秒计费:360p 为 $0.048/s,720p 为 $0.16/s,1080p 为 $0.24/s,4K 为 $0.48/s。10 秒的 1080p 片段费用为 $2.40。
视频编辑使用一个源视频和一条编辑指令,返回同一片段的重新设计版本。参考图生视频则根据提示词生成新视频,并利用按标签引用的多张参考图像和片段。