Veo 3.1 (Text-to-Video)
The model generates realistic 4, 6, 8-second 720p and 1080p videos with detailed visuals and audio.
Setup your API Key
If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.
How to Make a Call
API Schemas
Create a video generation task and send it to the server
You can generate a video using this API. In the basic setup, you only need a prompt.
The text description of the scene, subject, or action to generate in the video.
The aspect ratio of the generated video.
The length of the output video in seconds.
1080pPossible values: The description of elements to avoid in the generated video.
Whether to enhance the video generation.
trueWhether to generate audio for the video.
trueVarying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen.
Whether to automatically attempt to fix prompts that fail content policy or other validation checks by rewriting them.
trueSuccessfully generated video
Successfully generated video
Retrieve the generated video from the server
After sending a request for video generation, this task is added to the queue. This endpoint lets you check the status of a video generation task using its id, obtained from the endpoint described above.
If the video generation task status is complete, the response will include the final result — with the generated video URL and additional metadata.
Successfully generated video
Successfully generated video
Full Example: Generating and Retrieving the Video From the Server
The code below creates a video generation task, then automatically polls the server every 10 seconds until it finally receives the video URL.
This model produces highly detailed and natural-looking videos, so generation may take around 2 minutes for a 8-second video with audio.
Generated video (1280x720, with sound):
Last updated
Was this helpful?