curl --request POST \
--url https://api.mixroute.ai/v1/video/generations \
--header 'Authorization: Bearer sk-xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false
}'
import requests
url = "https://api.mixroute.ai/v1/video/generations"
headers = {
"Authorization": "Bearer sk-xxxxxxxxxx",
"Content-Type": "application/json"
}
payload = {
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": False
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://api.mixroute.ai/v1/video/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk-xxxxxxxxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'veo-3.1-fast-generate-preview',
prompt: 'Morning sunlight on cyber city skyscrapers, camera slowly pushing forward',
durationSeconds: 6,
aspectRatio: '16:9',
resolution: '1080p',
generateAudio: false
})
});
const data = await response.json();
console.log(data);
<?php
$client = new GuzzleHttp\Client();
$response = $client->post('https://api.mixroute.ai/v1/video/generations', [
'headers' => [
'Authorization' => 'Bearer sk-xxxxxxxxxx',
'Content-Type' => 'application/json',
],
'json' => [
'model' => 'veo-3.1-fast-generate-preview',
'prompt' => 'Morning sunlight on cyber city skyscrapers, camera slowly pushing forward',
'durationSeconds' => 6,
'aspectRatio' => '16:9',
'resolution' => '1080p',
'generateAudio' => false
]
]);
echo $response->getBody();
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false,
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.mixroute.ai/v1/video/generations", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer sk-xxxxxxxxxx")
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
import java.net.http.*;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String json = """
{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.mixroute.ai/v1/video/generations"))
.header("Authorization", "Bearer sk-xxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'json'
uri = URI('https://api.mixroute.ai/v1/video/generations')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer sk-xxxxxxxxxx'
request['Content-Type'] = 'application/json'
request.body = {
model: 'veo-3.1-fast-generate-preview',
prompt: 'Morning sunlight on cyber city skyscrapers, camera slowly pushing forward',
durationSeconds: 6,
aspectRatio: '16:9',
resolution: '1080p',
generateAudio: false
}.to_json
response = http.request(request)
puts response.body
{
"task_id": "task_xxx",
"status": "pending",
"created_at": 1709459123
}
Video Series
Gemini Native (Video)
Google Veo video generation model
POST
/
v1
/
video
/
generations
curl --request POST \
--url https://api.mixroute.ai/v1/video/generations \
--header 'Authorization: Bearer sk-xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false
}'
import requests
url = "https://api.mixroute.ai/v1/video/generations"
headers = {
"Authorization": "Bearer sk-xxxxxxxxxx",
"Content-Type": "application/json"
}
payload = {
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": False
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://api.mixroute.ai/v1/video/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk-xxxxxxxxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'veo-3.1-fast-generate-preview',
prompt: 'Morning sunlight on cyber city skyscrapers, camera slowly pushing forward',
durationSeconds: 6,
aspectRatio: '16:9',
resolution: '1080p',
generateAudio: false
})
});
const data = await response.json();
console.log(data);
<?php
$client = new GuzzleHttp\Client();
$response = $client->post('https://api.mixroute.ai/v1/video/generations', [
'headers' => [
'Authorization' => 'Bearer sk-xxxxxxxxxx',
'Content-Type' => 'application/json',
],
'json' => [
'model' => 'veo-3.1-fast-generate-preview',
'prompt' => 'Morning sunlight on cyber city skyscrapers, camera slowly pushing forward',
'durationSeconds' => 6,
'aspectRatio' => '16:9',
'resolution' => '1080p',
'generateAudio' => false
]
]);
echo $response->getBody();
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false,
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.mixroute.ai/v1/video/generations", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer sk-xxxxxxxxxx")
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
import java.net.http.*;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String json = """
{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.mixroute.ai/v1/video/generations"))
.header("Authorization", "Bearer sk-xxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'json'
uri = URI('https://api.mixroute.ai/v1/video/generations')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer sk-xxxxxxxxxx'
request['Content-Type'] = 'application/json'
request.body = {
model: 'veo-3.1-fast-generate-preview',
prompt: 'Morning sunlight on cyber city skyscrapers, camera slowly pushing forward',
durationSeconds: 6,
aspectRatio: '16:9',
resolution: '1080p',
generateAudio: false
}.to_json
response = http.request(request)
puts response.body
{
"task_id": "task_xxx",
"status": "pending",
"created_at": 1709459123
}
Introduction
Veo is a multimodal video generation model from Google Vertex AI, supporting text-to-video (T2V), first-frame constraint, and first-last frame constraint (3.1 series only) for generating coherent videos. Call through MixRoute unified video interface: first submit task to gettask_id, then query task to poll status and retrieve results.
Authentication
Bearer Token, e.g.,Bearer sk-xxxxxxxxxx
Supported Models
| Model ID | Description |
|---|---|
veo-3.0-fast-generate-001 | Text-to-video, first-frame mode, fast version (audio included by default) |
veo-3.1-fast-generate-preview | Text-to-video, first-frame/first-last frame mode, fast version |
veo-3.0-generate-preview | Text-to-video, first-frame mode |
veo-3.1-generate-preview | Text-to-video, first-frame/first-last frame mode |
Call Flow
- Submit Task:
POST /v1/video/generations, passmodel,promptand Veo-specific parameters. - Poll Status:
GET /v1/video/generations/{task_id}, untilstatusissucceededorfailed. - Get Result: When successful, the
urlin the response contains video data (Veo may returndata:video/mp4;base64,...or OSS link).
Veo-Specific Parameters
string
required
Video generation prompt describing the scene and actions.
integer
Video duration (seconds), supported values:
4, 6, 8.string
Aspect ratio, only supports:
16:9, 9:16.string
Resolution:
720p, 1080p.string
First frame reference image (URL or Base64), for image-to-video/first-frame constraint.
string
Last frame reference image (only
veo-3.1 series supported), works with first frame for first-last frame constraint.boolean
Whether to generate synchronized audio. Fast version models ignore this parameter and always include audio.
integer
Number of videos to generate per request, range
1-4.personGeneration, addWatermark, seed), see Submit Video Task.
Request Examples
- Submit Veo Task (Text-to-Video)
- Query Task Status
curl -X POST "https://api.mixroute.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false
}'
curl -X GET "https://api.mixroute.ai/v1/video/generations/{task_id}" \
-H "Authorization: Bearer sk-xxxxxxxxxx"
curl --request POST \
--url https://api.mixroute.ai/v1/video/generations \
--header 'Authorization: Bearer sk-xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false
}'
import requests
url = "https://api.mixroute.ai/v1/video/generations"
headers = {
"Authorization": "Bearer sk-xxxxxxxxxx",
"Content-Type": "application/json"
}
payload = {
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": False
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://api.mixroute.ai/v1/video/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk-xxxxxxxxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'veo-3.1-fast-generate-preview',
prompt: 'Morning sunlight on cyber city skyscrapers, camera slowly pushing forward',
durationSeconds: 6,
aspectRatio: '16:9',
resolution: '1080p',
generateAudio: false
})
});
const data = await response.json();
console.log(data);
<?php
$client = new GuzzleHttp\Client();
$response = $client->post('https://api.mixroute.ai/v1/video/generations', [
'headers' => [
'Authorization' => 'Bearer sk-xxxxxxxxxx',
'Content-Type' => 'application/json',
],
'json' => [
'model' => 'veo-3.1-fast-generate-preview',
'prompt' => 'Morning sunlight on cyber city skyscrapers, camera slowly pushing forward',
'durationSeconds' => 6,
'aspectRatio' => '16:9',
'resolution' => '1080p',
'generateAudio' => false
]
]);
echo $response->getBody();
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false,
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.mixroute.ai/v1/video/generations", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer sk-xxxxxxxxxx")
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
import java.net.http.*;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String json = """
{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight on cyber city skyscrapers, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.mixroute.ai/v1/video/generations"))
.header("Authorization", "Bearer sk-xxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'json'
uri = URI('https://api.mixroute.ai/v1/video/generations')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer sk-xxxxxxxxxx'
request['Content-Type'] = 'application/json'
request.body = {
model: 'veo-3.1-fast-generate-preview',
prompt: 'Morning sunlight on cyber city skyscrapers, camera slowly pushing forward',
durationSeconds: 6,
aspectRatio: '16:9',
resolution: '1080p',
generateAudio: false
}.to_json
response = http.request(request)
puts response.body
{
"task_id": "task_xxx",
"status": "pending",
"created_at": 1709459123
}
⌘I