Skip to main content
POST
Veo-3.1-Generate-Preview API

Authorizations

Authorization
string
header
required

##All APIs require Bearer Token authentication##

Get API Key:

Visit API Key Management Page to get your API Key

Add to request header:

Body

application/json
model
string
default:veo-3.1-generate-preview
required
prompt
string
required

Prompt, max 2000 tokens. Counted with cl100k; tokens are not characters.

image_urls
string<uri>[]

Reference images, max 3, max 10MB each; supported file formats: .jpg, .jpeg, .png

Maximum array length: 3
generation_type
enum<string>

Mode:

  • TEXT: Text-to-video (input images, if any, are not used)
  • FIRST&LAST: First-last frame, 1-2 images
  • REFERENCE: Reference image, max 3 images, duration fixed at 8s, aspect ratio fixed at 16:9, except generate_audio, other advanced params not supported
Available options:
TEXT,
FIRST&LAST,
REFERENCE
aspect_ratio
enum<string>

Video aspect ratio. auto is the same as omitting aspect_ratio: no ratio is specified and the model decides

Available options:
auto,
16:9,
9:16
generate_audio
boolean

Generate audio (extra cost), default true

duration
enum<integer>

Duration (seconds), default 4

Available options:
4,
6,
8
n
integer

Number of videos, default 1. Credits are reserved for all requested videos and settled on the videos actually returned

Required range: 1 <= x <= 4
quality
enum<string>

Resolution, default 720p

Available options:
720p,
1080p,
4k
seed
integer
Required range: 1 <= x <= 4294967295
negative_prompt
string
person_generation
enum<string>

Person generation control, default allow_adult. allow_adult: allow adults only; dont_allow: no people/faces

Available options:
allow_adult,
dont_allow
resize_mode
enum<string>

Resize mode (I2V only), default pad

Available options:
pad,
crop
callback_url
string<uri>

Response

Task created successfully

created
integer
Example:

1757169743

id
string
Example:

"task-unified-1757169743-7cvnl5zw"

model
string
Example:

"veo-3.1-generate-preview"

status
enum<string>
Available options:
pending,
processing,
completed,
failed
Example:

"processing"