gemini-omni-flash
Google gemini-omni-flash
以下说明使用 gemini-omni-flash 调用 aiftopia 的兼容接口。价格与分组在构建文档时同步自 newapi.aiftopia.com/pricing,实际账户分组和可用性以控制台为准。
#计费信息
原价
- 每次请求
- ¥0.086 / 请求
各分组价格单位:¥ / 每次请求,按原价 × 分组倍率
| 分组 | 每次请求 |
|---|---|
| default分组×1默认分组 | ¥0.086 |
| 绘图&视频分组×1需要绘图或视频选这个分组(按次调用,选1k/2k/4k、时长等参数都是一样的价格) | ¥0.086 |
价格与分组同步于 2026-11-02.
#视频生成
POST
https://newapi.aiftopia.com/v1/videos#请求参数
| 参数 | 类型 | 必填 | 默认值 | 枚举值 / 约束范围 | 说明 |
|---|---|---|---|---|---|
prompt | string | 是 | — | — | 描述期望生成的视频。 |
aspect_ratio | string | 否 | "16:9" | 16:9 | 9:16 | 输出视频的宽高比。 |
duration | integer | 否 | 5 | 3..10 | 生成视频的时长,单位为秒。 |
image_size | string | array | object | 否 | — | 1080P | 4K | 720P | 1920x1080 | 1080x1920 | 3840x2160 … | gemini-omni-flash 的可选精确输出尺寸;必须与 resolution 和 aspect_ratio 匹配。 |
image_urls | array | 否 | — | maxItems: 5 | 参考图片 URL,最多 5 个。 |
resolution | string | 否 | "720P" | 720P | 1080P | 4K | 输出视频的分辨率档位。 |
seed | integer | 否 | — | — | 用于可复现生成的随机种子。 |
video_url | string | 否 | — | — | 参考视频或初始化视频 URL。 |
video_urls | array | 否 | — | maxItems: 2 | 参考视频 URL,最多 2 个。 |
#请求示例
curl -X POST "https://newapi.aiftopia.com/v1/videos" \
-H "Authorization: Bearer $FOXROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash",
"prompt": "A red fox running through a snowy pine forest, cinematic lighting.",
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "720P"
}'import os
import requests
url = "https://newapi.aiftopia.com/v1/videos"
headers = {
"Authorization": "Bearer " + os.environ["FOXROUTER_API_KEY"],
"Content-Type": "application/json",
}
payload = """{
"model": "gemini-omni-flash",
"prompt": "A red fox running through a snowy pine forest, cinematic lighting.",
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "720P"
}"""
response = requests.post(url, headers=headers, data=payload)
print(response.status_code)
print(response.text)const payload = {
"model": "gemini-omni-flash",
"prompt": "A red fox running through a snowy pine forest, cinematic lighting.",
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "720P"
};
const response = await fetch("https://newapi.aiftopia.com/v1/videos", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FOXROUTER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log(response.status, await response.text());import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String payload = """
{
"model": "gemini-omni-flash",
"prompt": "A red fox running through a snowy pine forest, cinematic lighting.",
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "720P"
}
""";
HttpRequest.Builder builder = HttpRequest.newBuilder()
.uri(URI.create("https://newapi.aiftopia.com/v1/videos"))
.header("Authorization", "Bearer " + System.getenv("FOXROUTER_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(builder.build(), HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}#在线调用
curl -X POST "https://newapi.aiftopia.com/v1/videos" \
-H "Authorization: Bearer $FOXROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash",
"prompt": "A red fox running through a snowy pine forest, cinematic lighting.",
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "720P"
}'import os
import requests
url = "https://newapi.aiftopia.com/v1/videos"
headers = {
"Authorization": "Bearer " + os.environ["FOXROUTER_API_KEY"],
"Content-Type": "application/json",
}
payload = """{
"model": "gemini-omni-flash",
"prompt": "A red fox running through a snowy pine forest, cinematic lighting.",
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "720P"
}"""
response = requests.post(url, headers=headers, data=payload)
print(response.status_code)
print(response.text)const payload = {
"model": "gemini-omni-flash",
"prompt": "A red fox running through a snowy pine forest, cinematic lighting.",
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "720P"
};
const response = await fetch("https://newapi.aiftopia.com/v1/videos", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FOXROUTER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log(response.status, await response.text());import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String payload = """
{
"model": "gemini-omni-flash",
"prompt": "A red fox running through a snowy pine forest, cinematic lighting.",
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "720P"
}
""";
HttpRequest.Builder builder = HttpRequest.newBuilder()
.uri(URI.create("https://newapi.aiftopia.com/v1/videos"))
.header("Authorization", "Bearer " + System.getenv("FOXROUTER_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(builder.build(), HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}