Veo
curl --request POST \
--url https://api.mixroute.ai/v1/video/generationsimport requests
url = "https://api.mixroute.ai/v1/video/generations"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.mixroute.ai/v1/video/generations', 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.mixroute.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mixroute.ai/v1/video/generations"
req, _ := http.NewRequest("POST", url, nil)
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.mixroute.ai/v1/video/generations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixroute.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyVideo Series
Veo
Veo video generation parameters, media objects, and request examples using MixRoute metadata.
Veo
curl --request POST \
--url https://api.mixroute.ai/v1/video/generationsimport requests
url = "https://api.mixroute.ai/v1/video/generations"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.mixroute.ai/v1/video/generations', 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.mixroute.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mixroute.ai/v1/video/generations"
req, _ := http.NewRequest("POST", url, nil)
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.mixroute.ai/v1/video/generations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixroute.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyVeo generates video with native audio. This page uses the Gemini Developer API field definitions. MixRoute keeps
Confirm route availability in the Model Marketplace.
model and prompt at the root and places both media inputs and generation settings directly inside metadata.
POST https://api.mixroute.ai/v1/video/generations
Use a flat
metadata object. Do not add metadata.instances or metadata.parameters. Veo 3 models generate audio natively; do not send generateAudio. Vertex-specific output storage, Pub/Sub, masks, and other enterprise-only settings are not part of this request format.Models and Versions
| Model ID | Version |
|---|---|
veo-3.1-generate-preview | Veo 3.1 |
veo-3.1-fast-generate-preview | Veo 3.1 Fast |
veo-3.0-generate-001 | Veo 3 |
veo-3.0-fast-generate-001 | Veo 3 Fast |
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Complete MixRoute route ID. |
prompt | string | Yes | MixRoute video prompt describing the scene and motion; may include dialogue, sound effects, and music cues. |
metadata | object | Conditional | Required when supplying the media inputs or generation settings below. |
metadata.image | object | No | First-frame Image object. Use bytesBase64Encoded for the raw Base64 string and mimeType for its MIME type, such as image/png or image/jpeg. |
metadata.lastFrame | object | Conditional | Last-frame Image object for interpolation, with the same fields as image. Must be used together with metadata.image. |
metadata.referenceImages | object[] | No | Veo 3.1 reference inputs, at most three objects. Each contains image (Image object) and referenceType: "asset". Use an 8-second duration. |
metadata.video | object | No | Veo 3.1 extension input from a previous Veo generation. Supply uri, or Base64 bytes in encodedVideo with MIME type in encoding; do not use Vertex gcsUri or bytesBase64Encoded video fields. |
metadata.durationSeconds | integer | No | Veo 3.1: 4, 6, or 8 seconds. Use 8 for reference images, extension, 1080p, or 4k. Veo 3/3 Fast generate 8-second videos. |
metadata.aspectRatio | string | No | Values: 16:9 (default) or 9:16. Legacy Veo 3 1080p output requires 16:9. |
metadata.resolution | string | No | Veo 3.1: 720p (default), 1080p, 4k; 1080p/4k require 8 seconds. Extension is 720p only. Veo 3/3 Fast use 720p or 1080p. |
metadata.sampleCount | integer | No | Number of generated videos. Gemini Developer API produces one video per request; use 1. |
metadata.negativePrompt | string | No | Description of content or visual characteristics to exclude from the video. |
metadata.personGeneration | string | No | For Veo 3.1, text-to-video/extension uses allow_all; image/interpolation/reference modes use allow_adult. Regional policy can restrict the available choice to allow_adult. |
metadata.enhancePrompt | boolean | No | Veo 3/3.1 do not support disabling prompt rewriting. Omit this field; false is not a supported off switch. |
Scenario Constraints
- Image objects use raw Base64 data, not a
data:image/...;base64,prefix or an arbitrary URL string. - Reference images and video extension are Veo 3.1 capabilities; do not apply them to legacy Veo 3 routes.
- Extension input must be a recent Veo output: 720p, 16:9 or 9:16, at most 141 seconds, and still within its retention window. Each extension adds 7 seconds, up to 20 extensions and 148 seconds total;
durationSecondsmust still be 8 for the extension request. - Frame rate is 24 fps and audio is generated natively. Output retention is limited; retrieve completed results promptly.
Examples
SetMIXROUTE_API_KEY before calling the API. Replace media placeholders with accessible inputs. Accepted requests create billable generation tasks; do not automatically resubmit after a submission timeout.
- Text to video
curl --location "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "A blue circle gently pulses on a clean white background.",
"metadata": {
"durationSeconds": 4,
"aspectRatio": "9:16",
"resolution": "720p",
"sampleCount": 1
}
}'
Python
import json
import os
import requests
payload = json.loads(r'''
{
"model": "veo-3.1-fast-generate-preview",
"prompt": "A blue circle gently pulses on a clean white background.",
"metadata": {
"durationSeconds": 4,
"aspectRatio": "9:16",
"resolution": "720p",
"sampleCount": 1
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
print(response.json())