Veo 3.1
In this page's examples, {BASE_URL} is https://api.uniall.ai.
Veo 3.1 supports text-to-video, image-to-video, first-last-frame generation, multi-image reference generation, and video extension. Use the public model name to select the resolution and speed tier.
Supported Models
| Model | Tier |
|---|---|
veo3.1-video-720p | Standard 720p. |
veo3.1-video-1080p | Standard 1080p. |
veo3.1-video-4k | Standard 4K. |
veo3.1-fast-video-720p | Fast 720p. |
veo3.1-fast-video-1080p | Fast 1080p. |
veo3.1-fast-video-4k | Fast 4K. |
Endpoint
POST /v1/video/generations
GET /v1/videos/{task_id}
Authentication
Authorization: Bearer sk-***
Content-Type: application/json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Veo 3.1 public model ID. |
prompt | string | Strongly recommended | Main prompt. The schema is lenient, but production requests should include it. |
image | string | Conditional | Single source image URL for image-to-video. |
images | string[] | Conditional | 2 to 3 reference image URLs for multi-image reference generation. |
last_image | string | Conditional | Target last-frame image URL; use with image. |
video | string | Conditional | Source video URL for extension. |
size | string | Recommended | Resolution hint, aligned to the selected model tier. |
aspect_ratio | string | No | Text-to-video accepts 16:9 or 9:16. Image-to-video and extension may not honor it. |
duration | integer | Conditional | Output seconds. Allowed values: 4, 6, or 8. Not used for video extension. |
extra_body.generate_audio | boolean | No | Whether to generate audio; upstream usually defaults to true. |
extra_body.negative_prompt | string | No | Content to avoid. |
extra_body.seed | integer | No | Random seed for reproducibility. |
Text-To-Video Example
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "veo3.1-video-1080p",
"prompt": "A golden-hour street interview shot, slight handheld movement, natural city ambience, realistic human speech.",
"size": "1080p",
"aspect_ratio": "16:9",
"duration": 8,
"extra_body": {
"generate_audio": true,
"negative_prompt": "watermark, blur",
"seed": 7
}
}'
Image-To-Video Example
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "veo3.1-video-720p",
"prompt": "A product slowly rotates on a clean studio desk with soft reflected light.",
"image": "https://example.com/keyframe.png",
"size": "720p",
"aspect_ratio": "16:9",
"duration": 6,
"extra_body": {
"generate_audio": false,
"negative_prompt": "artifacts, camera shake"
}
}'
First-Last-Frame Example
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "veo3.1-fast-video-1080p",
"prompt": "Transition naturally from the first frame to the last frame, preserving subject identity and camera continuity.",
"image": "https://example.com/start-frame.png",
"last_image": "https://example.com/end-frame.png",
"size": "1080p",
"aspect_ratio": "16:9",
"duration": 6
}'
Task Status And Result
After creation, save id or task_id, then poll GET /v1/videos/{task_id} until the task reaches completed or failed. See Video Generation Overview for the shared polling interval, status fields, error contract, result URL, and authenticated download flow.
Billing Notes
Veo billing depends on model tier, speed tier, resolution, output duration, and audio generation. Use task settlement and current product pricing as the final source.
Common Errors
- Passing
durationoutside4,6, or8. - Mismatching
sizewith the selected model tier. - Expecting
aspect_ratioto be honored for image-to-video or extension requests. - Sending more than
3reference images. - Passing
videowithout clarifying the extension use case in the prompt or extra body.