Video GenerationVeo
Veo 3.1
Google Veo 3.1 — advanced video generation with audio, reference images, and last-frame control.
POST /v2/videos/generate — model: "veo-3.1"
Google Veo 3.1 offers the full suite of capabilities: audio generation, resolution control, negative prompts, reference images for style consistency, and last-frame control for precise endings.
See Video Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
veoParams.duration | integer | 8 | Video duration in seconds: 4, 6, or 8 |
veoParams.aspect_ratio | string | — | Aspect ratio in "W:H" format (e.g. "16:9") |
veoParams.seed | integer | — | Random seed for reproducibility |
veoParams.image | string | — | URL of an input image for image-to-video |
veoParams.resolution | string | — | Output resolution: "720p" or "1080p" |
veoParams.generate_audio | boolean | true | Whether to generate audio along with the video |
veoParams.negative_prompt | string | — | Things to avoid in the video (max 2,000 chars) |
veoParams.last_frame | string | — | URL of an image to use as the last frame |
veoParams.reference_images | string[] | — | Up to 3 reference image URLs for style guidance |
Credit cost
| Variant | Credits |
|---|---|
4s | 5 |
4s-audio | 10 |
6s | 8 |
6s-audio | 15 |
8s | 10 |
8s-audio | 20 |
Code examples
curl -X POST https://api.apiframe.ai/v2/videos/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a timelapse of a flower blooming in a garden",
"model": "veo-3.1",
"veoParams": {
"duration": 8,
"generate_audio": true,
"resolution": "1080p",
"reference_images": ["https://example.com/garden-style.jpg"]
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/videos/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "a timelapse of a flower blooming in a garden",
"model": "veo-3.1",
"veoParams": {
"duration": 8,
"generate_audio": True,
"resolution": "1080p",
"reference_images": ["https://example.com/garden-style.jpg"],
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "a timelapse of a flower blooming in a garden",
model: "veo-3.1",
veoParams: {
duration: 8,
generate_audio: true,
resolution: "1080p",
reference_images: ["https://example.com/garden-style.jpg"],
},
}),
});
console.log(await response.json());Try it
POST
/v2/videos/generateTry it