Google Gemini
Veo 3.1 Generate Preview
Create asynchronous video tasks with veo-3.1-generate-preview via POST /v1/predictions (function video).
POST
Overview
Google Veo 3.1 Generate Preview (veo-3.1-generate-preview) supports:
- Text-to-video —
promptonly - First / last frame —
first_frame_url,last_frame_url - Reference images — up to 3 URLs in
reference_image_urlsfor consistent subject appearance
Input parameters
| Field | Required | Default | Notes |
|---|---|---|---|
prompt | Yes | — | Max 1000 characters |
aspect_ratio | No | 16:9 | 16:9 or 9:16 only |
resolution | No | 720P | 720P, 1080P, 4K |
duration | No | 8 | 4, 6, or 8 (seconds) |
generate_audio | No | true | Include generated audio |
negative_prompt | No | — | Negative guidance text |
first_frame_url | No | — | First keyframe image URL |
last_frame_url | No | — | Last keyframe image URL |
reference_image_urls | No | [] | Up to 3 reference image URLs |
Authorizations
Authorization: Bearer YOUR_API_KEY
Body
application/json
Model ID. Use veo-3.1-generate-preview for this endpoint.
Available options:
veo-3.1-generate-preview Example:
"veo-3.1-generate-preview"
Task type. Must be video for video generation.
Available options:
video Example:
"video"
Optional HTTPS callback URL when the task completes, fails, or is cancelled.
Response
Async task created