Table of contents
Official Content
  • This documentation is valid for:

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.

Endpoint

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

Authentication

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

Supported Models

  • 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
Note:The complete lis is available at Vertex AI Documentation Site.

POST/videos/generations

Generates a new video from a text prompt or an input image using the specified Veo model.

Request

  • Method: POST
  • Path: $BASE_URL/L/videos/generations

Request Body

{
  "model": "string",          // Model identifier, e.g., "vertex_ai/veo-3.0-generate-001"
  "instances": 
    {
      "prompt": "string"      // Instructions for generating a video, e.g., "Generate a video of a sunset over the ocean"
    }
  ,
  "parameters": {
    "duration": integer       // Length of the generated video in seconds (Veo 2: 5-8, Veo 3: 4, 6, 8; default is 8)
  }
}
{
  "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)
  }
}

Response

{
  "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.

cURL Sample

curl -X POST “$BASE_URL/videos/generations” \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $GEAI_APITOKEN' \
-d '{
  "model":"vertex_ai/veo-3.0-generate-001",
  "instances": {
    "prompt": "Generate a video of a sunset over the ocean"
  },
  "parameters": {
    "duration": "8"
  }
}'
curl -X POST “$BASE_URL/videos/generations” \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $GEAI_APITOKEN' \
-d '{
  "model":"vertex_ai/veo-3.0-generate-001",
  "instances": {
    "prompt": "The toy comes to life and escapes",
    "image": {
      "bytesBase64Encoded": "{BASE_64}",
      "mimeType": "image/png"
    }
  },
  "parameters": {
    "duration": "8"
  }
}'

GET/videos/status

Retrieves the status of a video generation operation and, once completed, provides the download link for the generated video.

Request

  • Method: GET
  • Path: $BASE_URL/L/videos/status

Request Body

{
  "model": "string",         // Model identifier, e.g., "vertex_ai/veo-3.0-generate-001"
  "operationName": "string"  // Operation name returned by /videos/generations
}

Response

{
  "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 Sample

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"
}'

Availability

Since version 2025-11.

Last update: December 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant