提交 Gemini Omni 1.2 Flash 参考生视频 任务
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "google/gemini-omni-1.2-flash/reference-to-video",
"input": {
"prompt": "Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg",
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg"
],
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "google/gemini-omni-1.2-flash/reference-to-video",
"input": {
"prompt": "Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.",
"reference_image_urls": ["https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg", "https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg"],
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'google/gemini-omni-1.2-flash/reference-to-video',
input: {
prompt: 'Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.',
reference_image_urls: [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg',
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg'
],
duration: 5,
resolution: '720p',
aspect_ratio: '16:9'
}
})
};
fetch('https://api.vidgo.ai/api/generate/submit', 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://api.vidgo.ai/api/generate/submit",
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' => 'google/gemini-omni-1.2-flash/reference-to-video',
'input' => [
'prompt' => 'Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.',
'reference_image_urls' => [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg',
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg'
],
'duration' => 5,
'resolution' => '720p',
'aspect_ratio' => '16:9'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.vidgo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"google/gemini-omni-1.2-flash/reference-to-video\",\n \"input\": {\n \"prompt\": \"Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.\",\n \"reference_image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg\",\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.vidgo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"google/gemini-omni-1.2-flash/reference-to-video\",\n \"input\": {\n \"prompt\": \"Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.\",\n \"reference_image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg\",\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidgo.ai/api/generate/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"google/gemini-omni-1.2-flash/reference-to-video\",\n \"input\": {\n \"prompt\": \"Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.\",\n \"reference_image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg\",\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "VUDK1P7TS5FURNPB",
"status": "not_started",
"created_time": "2026-11-25T11:17:30"
}
}{
"detail": "reference-to-video requires reference_image_urls or reference_video_urls"
}{
"detail": "reference-to-video requires reference_image_urls or reference_video_urls"
}Google
Gemini Omni 1.2 Flash 参考生视频
Gemini Omni 1.2 Flash 参考生视频 API 用最多 10 张参考图和 3 个参考视频引导生成 3–15 秒的视频,最高 4K。
POST
/
api
/
generate
/
submit
提交 Gemini Omni 1.2 Flash 参考生视频 任务
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "google/gemini-omni-1.2-flash/reference-to-video",
"input": {
"prompt": "Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg",
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg"
],
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "google/gemini-omni-1.2-flash/reference-to-video",
"input": {
"prompt": "Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.",
"reference_image_urls": ["https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg", "https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg"],
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'google/gemini-omni-1.2-flash/reference-to-video',
input: {
prompt: 'Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.',
reference_image_urls: [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg',
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg'
],
duration: 5,
resolution: '720p',
aspect_ratio: '16:9'
}
})
};
fetch('https://api.vidgo.ai/api/generate/submit', 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://api.vidgo.ai/api/generate/submit",
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' => 'google/gemini-omni-1.2-flash/reference-to-video',
'input' => [
'prompt' => 'Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.',
'reference_image_urls' => [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg',
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg'
],
'duration' => 5,
'resolution' => '720p',
'aspect_ratio' => '16:9'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.vidgo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"google/gemini-omni-1.2-flash/reference-to-video\",\n \"input\": {\n \"prompt\": \"Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.\",\n \"reference_image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg\",\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.vidgo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"google/gemini-omni-1.2-flash/reference-to-video\",\n \"input\": {\n \"prompt\": \"Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.\",\n \"reference_image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg\",\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidgo.ai/api/generate/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"google/gemini-omni-1.2-flash/reference-to-video\",\n \"input\": {\n \"prompt\": \"Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.\",\n \"reference_image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg\",\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "VUDK1P7TS5FURNPB",
"status": "not_started",
"created_time": "2026-11-25T11:17:30"
}
}{
"detail": "reference-to-video requires reference_image_urls or reference_video_urls"
}{
"detail": "reference-to-video requires reference_image_urls or reference_video_urls"
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
- google/gemini-omni-1.2-flash/reference-to-video — Gemini Omni 1.2 Flash 参考生视频,最多 10 张图片和 3 个视频,360p 至 4K。
功能
- 单次请求最多 10 张参考图和 3 个参考视频。
- 时长可选 3 到 15 秒之间的任意整数秒。
- 四档分辨率:
360p、720p、1080p、4k。 - 横屏(
16:9)或竖屏(9:16)。
必填参数
prompt(string):场景描述,去除首尾空白后 1–20,000 个字符。reference_image_urls、reference_video_urls至少提供一项。
可选参数
reference_image_urls(string[]):最多 10 个公开的 HTTP(S) 图片 URL。reference_video_urls(string[]):最多 3 个公开的 HTTP(S) 视频 URL,每个最长 15 秒。duration(integer):输出时长,3–15秒。默认8。resolution(string):360p、720p、1080p或4k。默认720p。aspect_ratio(string):16:9或9:16。默认16:9。
输出
任务完成后,查询任务状态接口和回调内容的files 数组中返回一个 MP4 视频。
示例
- 人物与场景参考:第一张图中的录音师跪在第二张图地热平原上一处冒着蒸汽的矿物池边,5 秒,
720p,16:9(结果)。
注意事项
- 参考视频(MP4、MOV 或 WebM,每个最大 100 MB)在提交时下载并测量时长;每个最长 15 秒,须包含视频轨。
- 空字符串和空数组视为未提供,使用默认值。
model和callback_url放在请求根级,与input并列。input接收上文列出的字段,其他字段返回 400。- 积分在提交时预扣,等于输出
duration乘以所选resolution的每秒费率。任务失败全额退还。当前费率见定价页。
请求体
application/json