curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "Veo3.1-quality-official",
"prompt": "A dolphin leaping through crystal blue ocean waters, splashing water droplets, sunlight glistening on the surface",
"duration": 8,
"size": "16:9",
"resolution": "1080p",
"metadata": {
"generateAudio": true,
"negativePrompt": "blurry, low quality"
}
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={
"Authorization": "Bearer your-ToAPIs-key",
"Content-Type": "application/json"
},
json={
"model": "Veo3.1-quality-official",
"prompt": "A dolphin leaping through crystal blue ocean waters, splashing water droplets, sunlight glistening on the surface",
"duration": 8,
"size": "16:9",
"resolution": "1080p",
"metadata": {
"generateAudio": True,
"negativePrompt": "blurry, low quality"
}
}
)
task = response.json()
print(f"Task ID: {task['id']}")
print(f"Status: {task['status']}")
const response = await fetch('https://toapis.com/v1/videos/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-ToAPIs-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'Veo3.1-quality-official',
prompt: 'A dolphin leaping through crystal blue ocean waters, splashing water droplets, sunlight glistening on the surface',
duration: 8,
size: '16:9',
resolution: '1080p',
metadata: {
generateAudio: true,
negativePrompt: 'blurry, low quality'
}
})
});
const task = await response.json();
console.log(`Task ID: ${task.id}`);
console.log(`Status: ${task.status}`);
{
"id": "video_01K8SGYNNNVBQTXNR4MM964S7K",
"object": "generation.task",
"model": "Veo3.1-quality-official",
"status": "queued",
"progress": 0,
"created_at": 1768380224,
"metadata": {}
}
Veo3 Official (including Veo3.1 Lite)
Veo3 Official Video Generation
Generate high-quality videos using Google Veo3 official direct-connect models, with advanced features like audio generation and keyframe control
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "Veo3.1-quality-official",
"prompt": "A dolphin leaping through crystal blue ocean waters, splashing water droplets, sunlight glistening on the surface",
"duration": 8,
"size": "16:9",
"resolution": "1080p",
"metadata": {
"generateAudio": true,
"negativePrompt": "blurry, low quality"
}
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={
"Authorization": "Bearer your-ToAPIs-key",
"Content-Type": "application/json"
},
json={
"model": "Veo3.1-quality-official",
"prompt": "A dolphin leaping through crystal blue ocean waters, splashing water droplets, sunlight glistening on the surface",
"duration": 8,
"size": "16:9",
"resolution": "1080p",
"metadata": {
"generateAudio": True,
"negativePrompt": "blurry, low quality"
}
}
)
task = response.json()
print(f"Task ID: {task['id']}")
print(f"Status: {task['status']}")
const response = await fetch('https://toapis.com/v1/videos/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-ToAPIs-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'Veo3.1-quality-official',
prompt: 'A dolphin leaping through crystal blue ocean waters, splashing water droplets, sunlight glistening on the surface',
duration: 8,
size: '16:9',
resolution: '1080p',
metadata: {
generateAudio: true,
negativePrompt: 'blurry, low quality'
}
})
});
const task = await response.json();
console.log(`Task ID: ${task.id}`);
console.log(`Status: ${task.status}`);
{
"id": "video_01K8SGYNNNVBQTXNR4MM964S7K",
"object": "generation.task",
"model": "Veo3.1-quality-official",
"status": "queued",
"progress": 0,
"created_at": 1768380224,
"metadata": {}
}
Note for users in mainland China: Please use
https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.- Asynchronous processing mode, returns a task ID for subsequent status queries
- Direct connection to Google Vertex AI, supporting all native Veo parameters
- Supports text-to-video, image-to-video, and keyframe interpolation generation modes
- Generated video links are valid for 24 hours, please save them promptly
Important Change: For better performance and cost control, we no longer support passing base64 image data directly in
image_urls. Please use the Upload Image endpoint to upload images first, then use the returned URL in this API.Authorizations
string
required
All endpoints require Bearer Token authenticationGet API Key: Visit the API Key Management page to obtain your API KeyAdd to request headers:
Authorization: Bearer YOUR_API_KEY
Body
string
default:"Veo3.1-quality-official"
required
Video generation model nameAvailable models:
Veo3.1-quality-official- High-quality generation model, ideal for final productionVeo3.1-fast-official- Fast generation model, ideal for quick previews and iterationVeo3.1-lite-official- Lite 720p Example:"Veo3.1-quality-official"
string
required
Text description for video generation
integer
Video duration in secondsSupported values:
4- 4 seconds6- 6 seconds8- 8 seconds (default)
string
Video aspect ratioSupported formats:
16:9(landscape, default)9:16(portrait)
string
Video resolutionSupported values:
720p(default)1080p4k(preview)
string[]
First frame reference image for image-to-video generation. The video will begin from this image. Only the first URL in the array is used.⚠️ Only URL format is supported (base64 is no longer supported)
- Publicly accessible image URLs (http:// or https://)
- Use the Upload Image endpoint to upload local images and get URLs
- Maximum file size: 10MB
- Supported formats: .jpeg, .jpg, .png, .webp
image_urls and metadata.referenceImages cannot be used together. If both are provided, image_urls (first frame) takes priority and referenceImages will be ignored.object
Veo3 Official specific extension parameters
Show Show metadata fields
Show Show metadata fields
boolean
Whether to generate audio. Default:
falseWhen enabled, the video will include AI-generated sound effects and ambient audiostring
Negative prompt describing content you don’t want in the videoExample:
"blurry, low quality, distorted"string
Person generation safety settingSupported values:
allow_adult- Allow generating adult peopledont_allow- Don’t allow generating people
string
Last frame image URL for keyframe interpolation video generationMust be used together with
image_urls (first frame) to generate a transition video from the first frame to the last frame. Has no effect without image_urls.string[]
Style/asset reference image URL array. The video will incorporate the visual style and elements from these images (they are NOT used as the starting frame).Limit: maximum 3 images⚠️ Cannot be used together with
image_urls — these are mutually exclusive in the Veo API. Use image_urls if you need first-frame control.string
Video compression qualitySupported values:
optimized(default) - Optimized compressionlossless- Lossless compression
string
Image resize mode for image-to-video generationSupported values:
pad- Pad mode, preserves original aspect ratiocrop- Crop mode, fills the frame
Response
string
Unique task identifier for querying task status
string
Object type, always
generation.taskstring
Model name used
string
Task status
queued- Queued for processingin_progress- Processingcompleted- Successfully completedfailed- Failed
integer
Task progress percentage (0-100)
integer
Task creation timestamp (Unix timestamp)
object
Task metadata
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "Veo3.1-quality-official",
"prompt": "A dolphin leaping through crystal blue ocean waters, splashing water droplets, sunlight glistening on the surface",
"duration": 8,
"size": "16:9",
"resolution": "1080p",
"metadata": {
"generateAudio": true,
"negativePrompt": "blurry, low quality"
}
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={
"Authorization": "Bearer your-ToAPIs-key",
"Content-Type": "application/json"
},
json={
"model": "Veo3.1-quality-official",
"prompt": "A dolphin leaping through crystal blue ocean waters, splashing water droplets, sunlight glistening on the surface",
"duration": 8,
"size": "16:9",
"resolution": "1080p",
"metadata": {
"generateAudio": True,
"negativePrompt": "blurry, low quality"
}
}
)
task = response.json()
print(f"Task ID: {task['id']}")
print(f"Status: {task['status']}")
const response = await fetch('https://toapis.com/v1/videos/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-ToAPIs-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'Veo3.1-quality-official',
prompt: 'A dolphin leaping through crystal blue ocean waters, splashing water droplets, sunlight glistening on the surface',
duration: 8,
size: '16:9',
resolution: '1080p',
metadata: {
generateAudio: true,
negativePrompt: 'blurry, low quality'
}
})
});
const task = await response.json();
console.log(`Task ID: ${task.id}`);
console.log(`Status: ${task.status}`);
{
"id": "video_01K8SGYNNNVBQTXNR4MM964S7K",
"object": "generation.task",
"model": "Veo3.1-quality-official",
"status": "queued",
"progress": 0,
"created_at": 1768380224,
"metadata": {}
}