Gemini Omni 1.1 VIP
curl --request POST \
--url https://toapis.com/v1/videos \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>",
"image_urls": [
"<string>"
],
"generation_type": "<string>",
"video_urls": [
"<string>"
]
}
'import requests
url = "https://toapis.com/v1/videos"
payload = {
"model": "<string>",
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>",
"image_urls": ["<string>"],
"generation_type": "<string>",
"video_urls": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
prompt: '<string>',
duration: 123,
resolution: '<string>',
aspect_ratio: '<string>',
image_urls: ['<string>'],
generation_type: '<string>',
video_urls: ['<string>']
})
};
fetch('https://toapis.com/v1/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://toapis.com/v1/videos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'prompt' => '<string>',
'duration' => 123,
'resolution' => '<string>',
'aspect_ratio' => '<string>',
'image_urls' => [
'<string>'
],
'generation_type' => '<string>',
'video_urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://toapis.com/v1/videos"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"generation_type\": \"<string>\",\n \"video_urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://toapis.com/v1/videos")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"generation_type\": \"<string>\",\n \"video_urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/videos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"generation_type\": \"<string>\",\n \"video_urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "vid_example",
"object": "generation.task",
"model": "gemini-omni-1.1-flash-preview-vip",
"status": "queued",
"created_at": 1789600000
}
Gemini Omni Flash
Gemini Omni 1.1 VIP
VIP 支持文生视频, 图生视频和参考视频. 支持 4 / 6 / 8 / 10 秒和 360p / 720p / 1080p / 4k, 默认 6 秒 / 720p. 提供参考视频时省略时长参数.
POST
/
v1
/
videos
Gemini Omni 1.1 VIP
curl --request POST \
--url https://toapis.com/v1/videos \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>",
"image_urls": [
"<string>"
],
"generation_type": "<string>",
"video_urls": [
"<string>"
]
}
'import requests
url = "https://toapis.com/v1/videos"
payload = {
"model": "<string>",
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>",
"image_urls": ["<string>"],
"generation_type": "<string>",
"video_urls": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
prompt: '<string>',
duration: 123,
resolution: '<string>',
aspect_ratio: '<string>',
image_urls: ['<string>'],
generation_type: '<string>',
video_urls: ['<string>']
})
};
fetch('https://toapis.com/v1/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://toapis.com/v1/videos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'prompt' => '<string>',
'duration' => 123,
'resolution' => '<string>',
'aspect_ratio' => '<string>',
'image_urls' => [
'<string>'
],
'generation_type' => '<string>',
'video_urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://toapis.com/v1/videos"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"generation_type\": \"<string>\",\n \"video_urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://toapis.com/v1/videos")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"generation_type\": \"<string>\",\n \"video_urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/videos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"generation_type\": \"<string>\",\n \"video_urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "vid_example",
"object": "generation.task",
"model": "gemini-omni-1.1-flash-preview-vip",
"status": "queued",
"created_at": 1789600000
}
VIP 支持文生视频, 图生视频和参考视频. 支持 4 / 6 / 8 / 10 秒和 360p / 720p / 1080p / 4k, 默认 6 秒 / 720p. 提供参考视频时省略时长参数.
普通版 | Official 文档
使用平台 API Key, 不使用上游供应商 Key. 中国大陆可将 Base URL 换为 https://toapis.cn.
请求参数
string
必填
Bearer YOUR_API_KEYstring
必填
gemini-omni-1.1-flash-preview-vipstring
必填
必填的视频描述.
integer
默认值:"6"
VIP 支持 4 / 6 / 8 / 10 秒, 默认 6 秒. VIP 提供 video_urls 时必须省略 duration 和 seconds.
string
默认值:"720p"
VIP 支持 360p / 720p / 1080p / 4k, 默认 720p, 不区分大小写.
string
默认值:"16:9"
支持 16:9 或 9:16, 默认 16:9.
string[]
VIP 首帧模式 frame 仅 1 张, 参考模式 reference 为 1 或 3 张. 不支持 2 张首尾帧. 无图片时省略 generation_type.
string
仅 VIP. frame 表示首帧, reference 表示参考图. 省略时 1 张按首帧, 3 张按参考图处理.
string[]
仅 VIP, 最多 1 个公开 HTTP(S) 视频 URL, 可与图片同时提供. 时长跟随源视频, 不传 duration 或 seconds.
本地素材先通过上传接口获得公网 URL. 请勿发送 base64 或本地文件路径.
请求示例
- VIP
- VIP VIDREF
curl https://toapis.com/v1/videos \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gemini-omni-1.1-flash-preview-vip",
"prompt": "A cinematic tracking shot through a sunlit city",
"duration": 8,
"resolution": "360p",
"aspect_ratio": "9:16",
"generation_type": "reference",
"image_urls": [
"https://example.com/a.png",
"https://example.com/b.png",
"https://example.com/c.png"
]
}'
curl https://toapis.com/v1/videos \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gemini-omni-1.1-flash-preview-vip",
"prompt": "The same scene at night with neon lights",
"resolution": "4k",
"aspect_ratio": "16:9",
"generation_type": "reference",
"image_urls": ["https://example.com/image.png"],
"video_urls": ["https://example.com/video.mp4"]
}'
查询结果
提交返回平台任务 id. 通过 GET /v1/videos/ 查询, 完成后读取视频结果. 不要使用供应商 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.1-flash-preview-vip",
"status": "queued",
"created_at": 1789600000
}