输出分辨率
根据已发布的 endpoint 规格,支持 360p, 720p, 1080p, 4k。
curl -X POST https://runapi.ai/api/v1/gemini_omni/text_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-1-2",
"prompt": "生成一段 1080p 霓虹城市跟拍视频:可复用角色在雨中前行,并配合稳定旁白。",
"duration_seconds": 3
}'
import { GeminiOmniClient } from "@runapi.ai/gemini-omni";
const client = new GeminiOmniClient();
const result = await client.textToVideo.run({
model: "gemini-omni-flash-1-2",
prompt: "生成一段 1080p 霓虹城市跟拍视频:可复用角色在雨中前行,并配合稳定旁白。",
duration_seconds: 3,
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/gemini_omni/text_to_video",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"gemini-omni-flash-1-2","prompt":"生成一段 1080p 霓虹城市跟拍视频:可复用角色在雨中前行,并配合稳定旁白。","duration_seconds":3}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/gemini_omni/text_to_video");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gemini-omni-flash-1-2',
'prompt' => '生成一段 1080p 霓虹城市跟拍视频:可复用角色在雨中前行,并配合稳定旁白。',
'duration_seconds' => 3,
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.textToVideo().run({"model":"gemini-omni-flash-1-2","prompt":"生成一段 1080p 霓虹城市跟拍视频:可复用角色在雨中前行,并配合稳定旁白。","duration_seconds":3});
task.waitForResult();
require "runapi/gemini_omni"
client = RunApi::GeminiOmni::Client.new
result = client.text_to_video.run(
model: "gemini-omni-flash-1-2",
prompt: "生成一段 1080p 霓虹城市跟拍视频:可复用角色在雨中前行,并配合稳定旁白。",
duration_seconds: 3
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.textToVideo.Run({"model":"gemini-omni-flash-1-2","prompt":"生成一段 1080p 霓虹城市跟拍视频:可复用角色在雨中前行,并配合稳定旁白。","duration_seconds":3})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model gemini-omni-flash-1-2 \
--endpoint text_to_video \
--wait
6 个版本可用
使用 gemini-omni-flash-1-2 进行文生视频、参考生成、源视频编辑或首尾帧控制。生成时长为 3 至 15 秒的整数。
基于图片创建可复用角色,在生成或编辑时传入最多两个自己创建的角色 ID。角色不能与首尾帧控制同时使用。
选择任意模型,几秒内开始生成。
| 提供商 | |
| 模型 ID | gemini-omni-flash-1-2 |
| 模态 | 视频 |
| 任务类型 | Asynchronous |
| API 端点 | /api/v1/gemini_omni/text_to_video, /api/v1/gemini_omni/extend_video |
| 计费单位 | 秒 |
| 输入参数 | aspect_ratio, callback_url, character_ids, duration_seconds, first_frame_image_url, last_frame_image_url, model, output_resolution, prompt, reference_image_urls, reference_video_urls, seed, source_task_id |
| 最大分辨率 | 360p, 720p, 1080p, 4k |
| 宽高比 | 16:9, 9:16, auto |
| 目录状态 | 运行中 |
免费注册后,在控制台创建用于 gemini-omni-flash-1-2 的 API 密钥。
向 /api/v1/gemini_omni/text_to_video 发送 POST 请求,并传入 gemini-omni-flash-1-2 模型 ID 和参数。
轮询任务或按照回调获取已完成的 gemini-omni-flash-1-2 结果。
根据已发布的 endpoint 规格,支持 360p, 720p, 1080p, 4k。
可配置文档中列出的 11 个参数,包括 aspect_ratio, character_ids, duration_seconds, first_frame_image_url, last_frame_image_url。
提供 2 个公开 endpoint:text_to_video, extend_video。
异步任务支持回调 URL,任务完成时发送通知。
seedDeterministic generation seed.
promptVideo generation or edit prompt.
aspect_ratioOutput aspect ratio. (16:9, 9:16, auto)
callback_urlWebhook URL for terminal Task delivery.
character_idsOwn completed character IDs; character images do not consume reference slots.
duration_secondsGenerated seconds, required except video edit; first and last frames allow at most 10 seconds.
output_resolutionOutput resolution. (360p, 720p, 1080p, 4k)
last_frame_image_urlLast frame, requires first frame and duration of 3–10 seconds.
reference_image_urlsReference images, one slot each; up to seven shared slots with video.
reference_video_urlsSource video for edit; consumes two reference slots and determines output and billable duration.
first_frame_image_urlFirst frame, exclusive with reference images, videos and characters.
从文字简报生成产品发布短视频和广告片段,将制作周期从数周缩短到数小时。
将课程脚本批量转换为动画讲解视频,无需摄像设备和拍摄团队。
直接从提示词生成社交平台短视频内容。
最多使用六张参考图和一个 reference_video_urls 条目。视频占七个参考槽中的两个,角色不占参考槽。
设置 first_frame_image_url,并按需设置 last_frame_image_url。尾帧必须配合首帧使用。首尾帧控制不能与参考图、源视频或角色 ID 混用。
使用 extend_video 续写本账号已完成的 Flash 1.2 生成或续写任务。源视频须为 360p 或 720p,且不超过 15 秒。新增时长为 3-10 秒的整数,可选最多三张参考图。结果包含原视频和新增片段。
生成和续写均返回异步任务。查询任务或传入 callback_url 接收完成通知。续写结果的时长包含原视频和新增片段。
传入 quickstart 中显示的模型 ID。
Key 级限流随使用层级伸缩。当前限制见定价页。
可以——变体只是参数,改 model 字段即可。
模型支持流式时,RunAPI 端到端流式。
在公共 GitHub 仓库提 issue 或邮件联系 support。
不需要。你的 RunAPI API key 足以访问此 variant 以及目录中的所有其他模型,无需底层提供方账户。