Veo 3.1 API
Complete API reference for Veo 3.1 video generation models.
Model Variants
This API supports four model variants:
Quick Comparison
Veo 3.1 Text to Video (Standard & Fast)
Endpoint
POST /api/v1/video/task
Request Parameters
Required
Optional
Example Request
Standard Version:
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'veo3.1-text-to-video',
prompt: 'A time-lapse of a flower blooming'
})
});
const { data } = await response.json();
const taskId = data.task_id;
Fast Version:
{
model_name: 'veo3.1-fast-text-to-video',
prompt: 'A time-lapse of a flower blooming'
}
Veo 3.1 Image to Video (Standard & Fast)
Request Parameters
Required
Optional
Example Request
Standard Version:
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'veo3.1-image-to-video',
image_url: 'https://example.com/image.jpg',
prompt: 'Camera slowly zooms in, soft wind movement'
})
});
const { data } = await response.json();
const taskId = data.task_id;
Fast Version:
{
model_name: 'veo3.1-fast-image-to-video',
image_url: 'https://example.com/image.jpg',
prompt: 'Camera slowly zooms in, soft wind movement'
}
Initial Response
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "submitted"
}
}
Polling Response
Poll /api/v1/video/{taskId} to check status:
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "succeed",
"task_status_msg": null,
"task_result": {
"videos": [
{
"url": "https://example.com/generated-video.mp4"
}
]
}
}
}
Status Values
submitted: Task accepted and waiting to be processed
processing: Video generation in progress
succeed: Video generation completed
failed: Video generation failed
Processing Time
- Standard Version: ~2-3 minutes
- Fast Version: ~1-2 minutes
Use polling to check generation status every 5-10 seconds.
Best Practices
- Be specific about camera movements and scene dynamics
- Fast version offers good quality with faster processing
- Standard version provides highest quality output
- Use descriptive prompts for better results