Create video generation task
curl --request POST \
--url https://api.mountsea.ai/gemini/video/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A fluffy orange cat running through a sunny meadow",
"action": "text2video",
"model": "veo31_fast",
"imageList": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"aspectRatio": "16:9",
"duration": 8,
"generate_audio": true,
"resolution": "<string>",
"translation": false
}
'import requests
url = "https://api.mountsea.ai/gemini/video/generate"
payload = {
"prompt": "A fluffy orange cat running through a sunny meadow",
"action": "text2video",
"model": "veo31_fast",
"imageList": ["https://example.com/image1.jpg", "https://example.com/image2.jpg"],
"aspectRatio": "16:9",
"duration": 8,
"generate_audio": True,
"resolution": "<string>",
"translation": False
}
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({
prompt: 'A fluffy orange cat running through a sunny meadow',
action: 'text2video',
model: 'veo31_fast',
imageList: ['https://example.com/image1.jpg', 'https://example.com/image2.jpg'],
aspectRatio: '16:9',
duration: 8,
generate_audio: true,
resolution: '<string>',
translation: false
})
};
fetch('https://api.mountsea.ai/gemini/video/generate', 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.mountsea.ai/gemini/video/generate",
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([
'prompt' => 'A fluffy orange cat running through a sunny meadow',
'action' => 'text2video',
'model' => 'veo31_fast',
'imageList' => [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg'
],
'aspectRatio' => '16:9',
'duration' => 8,
'generate_audio' => true,
'resolution' => '<string>',
'translation' => false
]),
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.mountsea.ai/gemini/video/generate"
payload := strings.NewReader("{\n \"prompt\": \"A fluffy orange cat running through a sunny meadow\",\n \"action\": \"text2video\",\n \"model\": \"veo31_fast\",\n \"imageList\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"aspectRatio\": \"16:9\",\n \"duration\": 8,\n \"generate_audio\": true,\n \"resolution\": \"<string>\",\n \"translation\": false\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.mountsea.ai/gemini/video/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A fluffy orange cat running through a sunny meadow\",\n \"action\": \"text2video\",\n \"model\": \"veo31_fast\",\n \"imageList\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"aspectRatio\": \"16:9\",\n \"duration\": 8,\n \"generate_audio\": true,\n \"resolution\": \"<string>\",\n \"translation\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/gemini/video/generate")
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 \"prompt\": \"A fluffy orange cat running through a sunny meadow\",\n \"action\": \"text2video\",\n \"model\": \"veo31_fast\",\n \"imageList\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"aspectRatio\": \"16:9\",\n \"duration\": 8,\n \"generate_audio\": true,\n \"resolution\": \"<string>\",\n \"translation\": false\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}视频 (Veo / Omni)
Veo / Omni 视频生成
同一入口同时支持 Veo 与 Omni,用 model 区分。不要混用对方的图数 / 时长规则。
公共字段
prompt必填(建议英文)action:text2video/img2video/ingredients2videoaspectRatio:16:9(默认)/9:16- 升清 / GIF 请走
/video/upsample,不要用本接口
Veo(veo31_fast / veo31_quality)
| action | 图数 | duration | 说明 |
|---|---|---|---|
| text2video | 0 | 4 / 6 / 8,可省略 | 纯文生 |
| img2video | 1~2 | 4 / 6 / 8,可省略 | 1=首帧,2=首+尾。禁止 3 张 |
| ingredients2video | 1~3(必填) | 3 张时只能 8(或不传=8) | 对外 model 必须 veo31_fast |
3 张引导图说明:
- 对外仍写
model=veo31_fast+action=ingredients2video(兼容旧 modelveo31_fast_ingredients) veo31_fast本身只支持最多 2 张首/尾帧;3 张由服务端改走支持参考图的 Veo 3.1- 上游 3 张参考图只接受 8 秒,传 4/6 会直接 400
veo3_fast / veo3_quality 会自动映射为 veo31_*。可选 generate_audio、resolution(如 720p / 1080p)。
Omni(omni-flash)
| action | 图数 | duration | 说明 |
|---|---|---|---|
| text2video | 不能带图 | 3–10,可省略(默认约 5) | 纯文生 |
| img2video | 1~7 | 3–10,可省略(默认约 5) | 1=首帧;2~7=全部当参考图,不拆首尾帧。按图数选渠 |
Omni 不支持 ingredients2video。generate_audio / resolution 对 Omni 无效。
POST
/
gemini
/
video
/
generate
Create video generation task
curl --request POST \
--url https://api.mountsea.ai/gemini/video/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A fluffy orange cat running through a sunny meadow",
"action": "text2video",
"model": "veo31_fast",
"imageList": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"aspectRatio": "16:9",
"duration": 8,
"generate_audio": true,
"resolution": "<string>",
"translation": false
}
'import requests
url = "https://api.mountsea.ai/gemini/video/generate"
payload = {
"prompt": "A fluffy orange cat running through a sunny meadow",
"action": "text2video",
"model": "veo31_fast",
"imageList": ["https://example.com/image1.jpg", "https://example.com/image2.jpg"],
"aspectRatio": "16:9",
"duration": 8,
"generate_audio": True,
"resolution": "<string>",
"translation": False
}
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({
prompt: 'A fluffy orange cat running through a sunny meadow',
action: 'text2video',
model: 'veo31_fast',
imageList: ['https://example.com/image1.jpg', 'https://example.com/image2.jpg'],
aspectRatio: '16:9',
duration: 8,
generate_audio: true,
resolution: '<string>',
translation: false
})
};
fetch('https://api.mountsea.ai/gemini/video/generate', 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.mountsea.ai/gemini/video/generate",
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([
'prompt' => 'A fluffy orange cat running through a sunny meadow',
'action' => 'text2video',
'model' => 'veo31_fast',
'imageList' => [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg'
],
'aspectRatio' => '16:9',
'duration' => 8,
'generate_audio' => true,
'resolution' => '<string>',
'translation' => false
]),
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.mountsea.ai/gemini/video/generate"
payload := strings.NewReader("{\n \"prompt\": \"A fluffy orange cat running through a sunny meadow\",\n \"action\": \"text2video\",\n \"model\": \"veo31_fast\",\n \"imageList\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"aspectRatio\": \"16:9\",\n \"duration\": 8,\n \"generate_audio\": true,\n \"resolution\": \"<string>\",\n \"translation\": false\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.mountsea.ai/gemini/video/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A fluffy orange cat running through a sunny meadow\",\n \"action\": \"text2video\",\n \"model\": \"veo31_fast\",\n \"imageList\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"aspectRatio\": \"16:9\",\n \"duration\": 8,\n \"generate_audio\": true,\n \"resolution\": \"<string>\",\n \"translation\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/gemini/video/generate")
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 \"prompt\": \"A fluffy orange cat running through a sunny meadow\",\n \"action\": \"text2video\",\n \"model\": \"veo31_fast\",\n \"imageList\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"aspectRatio\": \"16:9\",\n \"duration\": 8,\n \"generate_audio\": true,\n \"resolution\": \"<string>\",\n \"translation\": false\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
Video description/prompt (English recommended for best results)
示例:
"A fluffy orange cat running through a sunny meadow"
Video generation action
可用选项:
text2video, img2video, ingredients2video 示例:
"text2video"
生成模型。
- Veo:
veo31_fast(默认推荐)/veo31_quality。veo3_*会自动映射为veo31_*。 - 3 张引导图:对外仍传
veo31_fast+ingredients2video(或兼容 modelveo31_fast_ingredients)。fast 本身只支持最多 2 张首/尾帧,服务端会改走支持 3 张参考图的 Veo 3.1 能力。 - Omni:
omni-flash,仅text2video/img2video,不支持ingredients2video。
可用选项:
veo2_fast, veo2_quality, veo3_fast, veo3_quality, veo31_fast, veo31_quality, veo31_fast_ingredients, veo31_lite, omni-flash 示例:
"veo31_fast"
参考图 URL(必须可公网访问的 http/https)。 Veo
text2video:不要传图(或空数组)。img2video:1 张 = 首帧;2 张 = 首帧 + 尾帧。不能传 3 张(3 张请用ingredients2video)。ingredients2video:1~3 张引导图(必填)。3 张时duration必须为 8(或不传,默认 8)。- 兼容:
model=veo31_fast_ingredients时按ingredients2video处理,1~3 张。 Omni(omni-flash) text2video:不能带图。img2video:1 张 = 首帧;2~7 张 = 全部作为参考图(不会拆成首/尾帧)。 各渠张数上限不同,服务端按图数选渠;超过全部渠道能力会失败。
示例:
[
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
]
Video aspect ratio
可用选项:
16:9, 9:16 示例:
"16:9"
时长(秒)。不传则用服务端默认。
- Veo:
4/6/8。3 张引导图只能 8(传 4/6 会 400);不传则按 8。 - Omni:整数
3–10(不传约 5 秒)。
示例:
8
是否生成音频。仅 Veo 生效;Omni 忽略。可选。
分辨率,如 720p / 1080p。仅 Veo 生效;Omni 固定约 720p,传入会被忽略。可选。
[已废弃] Enable automatic prompt translation to English
示例:
false
响应
201 - application/json
task id, used to get task result later