Skip to main content
POST
Veo 3.1 Text-to-Video
The Veo 3.1 Preview API is automatically compatible with this endpoint
Use the Veo 3.1 video generation model to generate high-quality video content from text descriptions. This endpoint uses asynchronous processing, and you need to query the final generation result using the task_id.

Request Headers

string
required
Enum value: application/json
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

string
required
A text string describing the video you want to generate.
string
Specifies the aspect ratio of the generated video.Enum values: 16:9, 9:16. The default value is 16:9.
integer
The length of the video file you want to generate, in seconds.Enum values: 4, 6, 8. The default value is 8.
boolean
Specifies whether to use Gemini to enhance your prompt. Only true is supported.Default value: true
boolean
required
Specifies whether to generate audio for the video.
string
A text string describing what you want to prevent the model from generating.
string
Safety setting that controls whether people or faces are allowed to be generated.Enum values:
  • allow_adult (default): Only adults are allowed to be generated
  • dont_allow: People or faces are not allowed in the image
  • allow_all: Allows generating people of all ages (requires the project to be in the allowlist)
string
The resolution of the generated video.Enum values: 720p (default) or 1080p
integer
The number of videos to generate.Value range: 1-4
uint32
A number used to initialize the random generation process. Using the same seed, prompt, and other parameters will produce the same output video, making the generation process deterministic.Value range: 0-4,294,967,295

Response Parameters

string
required
The task_id of the asynchronous task. You should use this task_id to request the Query Task Result API to obtain the generation result.