This API enables you to generate high-quality videos from text prompts or images. It supports multiple Veo model versions and allows customization of parameters such as resolution and aspect ratio.
Check the generic variables needed to use the API.
| Method |
Endpoint |
Description |
| POST |
/videos/generations |
Generate a video from a text prompt or image |
| GET |
/videos/status |
Retrieve the status and download link of a video |
All endpoints require authentication using one of the following:
- Authorization: Bearer $GEAI_APITOKEN
- Authorization: Bearer $OAuth_accesstoken
For $OAuth_accesstoken, you must also include the header: ProjectId: $GEAI_PROJECT_ID
Some endpoints may require additional headers such as:
- Content-Type: application/json
- Accept: application/json
- Veo 2: veo-2.0-generate-001
- Veo 3: veo-3.0-generate-001
- Veo 3: veo-3.0-fast-generate-001
- Veo 3: veo-3.0-generate-preview (Preview)
- Veo 3: veo-3.0-fast-generate-preview (Preview)
- Veo 3.1: veo-3.1-generate-preview
- Veo 3.1: veo-3.1-fast-generate-preview
Generates a new video from a text prompt or an input image using the specified Veo model.
- Method: POST
- Path: $BASE_URL/L/videos/generations
{
"model": "string", // Model identifier, e.g., "vertex_ai/veo-3.0-generate-001"
"instances":
{
"prompt": "string", // Instructions for generating a video, e.g., "The toy comes to life and escapes"
"image": {
"bytesBase64Encoded": "string", // Base64-encoded image data
"mimeType": "string" // MIME type of the image, e.g., "image/png" or "image/jpeg"
}
}
,
"parameters": {
"duration": integer // Length of the generated video in seconds (Veo 2: 5-8, Veo 3: 4, 6, 8; default is 8)
}
}
{
"usage": {
"completion_tokens_details": "string", // (Optional) Details about completion tokens used
"prompt_tokens_details": "string", // (Optional) Details about prompt tokens used
"total_tokens": integer, // (Optional) Total number of tokens used
"currency": "string" // (Optional) Currency code, e.g., "USD"
},
"name": "string" // Operation name to check status, e.g., "projects/globant-enterprise-ai-dev/locations/us-central1/publishers/google/models/veo-3.0-generate-001/operations/8ed9d85a-e422-4aae-952d-3fa42b076663"
}
Use the name field to check the status of the video generation operation.
Retrieves the status of a video generation operation and, once completed, provides the download link for the generated video.
- Method: GET
- Path: $BASE_URL/L/videos/status
{
"model": "string", // Model identifier, e.g., "vertex_ai/veo-3.0-generate-001"
"operationName": "string" // Operation name returned by /videos/generations
}
{
"url": "string", // URL to download the generated video
"revised_prompt": "string", // (Optional) Revised prompt used for generation
"b64_json": "string" // (Optional) Additional metadata or result in base64-encoded JSON
}
curl -X GET “$BASE_URL/videos/status” \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $GEA_APITOKEN' \
-d'{
"model":"vertex_ai/veo-3.0-generate-001",
"operationName": "projects/globant-enterprise-ai-dev/locations/us-central1/publishers/google/models/veo-3.0-generate-preview/operations/a41beab1-98b0-404d-a93c-235bff756b2e"
}'
Since version 2025-11.