All insights

Video generation

Veo API: Official Google Access, Python Quickstart, and Production Checks

Find Google’s Veo API route, start a Python integration with the Google Gen AI SDK, and check model support and production requirements before shipping.

Illustration for Veo api

For a new Google Veo integration, start with Veo on Gemini Enterprise Agent Platform. Google’s Gemini API documentation says its Veo 3.1 preview models were shut down on October 22, 2026, and directs developers to Agent Platform’s GA Veo models or Gemini Omni Flash. The Agent Platform model page lists veo-3.1-generate-001 and veo-3.1-fast-generate-001; the text-to-video guide also lists veo-3.1-lite-generate-001 as a preview model. (Google’s Gemini API Veo documentation)

The official starting points are Google’s Veo 3.1 model documentation and text-to-video guide. These cover Google’s Cloud API route. A third-party service that offers a “Veo API” has its own endpoint and terms; it is not the Google-hosted API.

Which Veo API route should you use?

Need Route Note
Integrate Google’s listed Veo models Gemini Enterprise Agent Platform Follow its model, setup, and video-generation documentation. Google’s current docs list Generate and Fast, plus Lite as preview in the text-to-video guide. (Veo model documentation)
Continue using Veo 3.1 through the old Gemini Developer API preview Migrate rather than start here Google says the Veo 3.1 preview models were shut down on October 22, 2026. (Gemini API Veo documentation)
Use a proxy or unified API provider That provider’s API Treat its endpoint, model support, billing, and data-handling terms as provider-specific—not as Google API specifications.

Google also publishes a Cloud REST endpoints.predict reference that covers a publisher-model resource format for Google models such as Veo. Keep that REST reference distinct from the Gen AI SDK workflow below; use the API surface documented for your particular integration. (Google Cloud REST reference)

Quick start: submit a Veo job with Python

This is a starting-point skeleton for using the Google Gen AI SDK with Gemini Enterprise Agent Platform. It shows a text prompt and operation polling, but does not establish the exact prompt-only request configuration or output destination behavior for your model and route. Follow Google’s text-to-video guide for the current complete request and output instructions before relying on it as a runnable end-to-end example.

Prerequisites

  1. Select or create a Google Cloud project, enable billing, and enable the Agent Platform API. Follow Google’s Agent Platform setup guide.
  2. Configure Application Default Credentials (ADC) using Google’s authentication instructions. Google’s SDK overview recommends ADC for authentication.
  3. Install the Google Gen AI Python SDK and set the project, location, and SDK backend configuration. Google’s SDK guide documents GOOGLE_GENAI_USE_ENTERPRISE=True for this route. (SDK overview)

Install the SDK:

pip install --upgrade google-genai

Set the configuration for your project and a supported location. Google’s model page lists us-central1 for US availability; confirm availability for your project and model before running the request. (Veo model documentation)

export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
export GOOGLE_CLOUD_LOCATION="us-central1"
export GOOGLE_GENAI_USE_ENTERPRISE=True

The following illustrates submitting and polling an operation. Confirm the exact text-to-video call and output configuration in Google’s guide for your selected model:

import time
from google import genai
from google.genai.types import HttpOptions

client = genai.Client(
    http_options=HttpOptions(api_version="v1")
)

operation = client.models.generate_videos(
    model="veo-3.1-generate-001",
    prompt="A small sailboat crosses a calm lake at sunrise; wide shot, gentle ripples, warm natural light.",
)

while not operation.done:
    time.sleep(15)
    operation = client.operations.get(operation)

print("Generation operation completed.")

The SDK configuration and v1 client option follow Google’s SDK overview; the model ID is listed in Google’s Veo documentation. Google’s sample demonstrates polling and reading a generated video URI in an image-to-video workflow; that sample does not by itself establish the default output behavior for this prompt-only snippet. (SDK overview, Google Veo sample)

Retrieve the video

The snippet above does not establish whether a destination must be configured or what output is returned when it is omitted. Do not assume it produces a gs:// URI. Follow the official text-to-video instructions to configure output and retrieve the result for your request mode.

If the documented workflow returns a Cloud Storage object URI, and you have permission to read that object, you can download it with the Google Cloud CLI:

gcloud storage cp "gs://YOUR_BUCKET/PATH/VIDEO.mp4" ./veo-output.mp4

Cloud Storage documents storage.objects.get as the permission required to read an object. Confirm the access setup for your workflow; do not make the bucket public merely to retrieve a generated video. (Cloud Storage download documentation)

For a custom Cloud Storage output destination, use the configuration documented for your selected request mode. Google’s sample demonstrates output-URI configuration in an image-to-video workflow; confirm the exact setting in the text-to-video guide before applying it to prompt-only generation. (Google Veo sample)

Which Veo model and features should you choose?

Google’s current model page lists veo-3.1-generate-001 and veo-3.1-fast-generate-001. The text-to-video guide additionally lists veo-3.1-lite-generate-001 as preview. Check the model page’s version and feature details when choosing a model; do not substitute the retired Gemini API preview identifiers. (Veo model documentation)

  • Generate: Google lists 720p, 1080p, and 4K output, with 4-, 6-, or 8-second video lengths. Reference-image-to-video is listed as supporting 8 seconds only. (Veo model documentation)
  • Fast: Google lists 720p and 1080p output, with 4-, 6-, or 8-second video lengths. The model page lists reference-image support for both Generate and Fast; check its workflow guide for mode-specific requirements. (Veo model documentation)
  • Reference images: Google’s guide allows up to three images of a single person, character, or product, and specifically lists Generate and Fast as supported models. (Reference-image guide)
  • Video extension: Google’s guide says a Veo input video must be 1–30 seconds and the extension adds 7 seconds, for up to 37 seconds total. Treat this as a separate workflow, not the ordinary text-to-video duration. (Video-extension guide)

The model page also lists up to four output videos per prompt and a 20 MB maximum input-image size for image-to-video. These are documented model conditions; confirm the selected mode’s requirements before validating user input. (Veo model documentation)

Production checks before you ship

  • Access and location: Confirm project setup, billing, API enablement, credentials, and model availability for your chosen location. Google’s model page lists US availability in us-central1; do not assume every region is supported. (Veo model documentation)
  • Quota and purchasing: Check the current consumption-options table for your exact model and region before estimating costs or capacity. The model page includes a Pay-as-you-go unsupported entry, but verify which variant and conditions it applies to. Do not assume that fixed quota, Provisioned Throughput, or batch inference is available—or unavailable—for both Generate and Fast based on a combined summary. (Veo model documentation)
  • Inputs and outputs: Validate duration, resolution, aspect ratio, image size, and output count against the selected model and workflow. Generate and Fast do not have identical output-resolution listings. (Veo model documentation)
  • Operations and errors: Video generation returns a long-running operation in Google’s sample. Persist operation state, handle unsuccessful jobs, and define your own timeout and retry behavior; the sample does not establish a completion-time guarantee or production retry policy. (Google Veo sample)
  • Safety and provenance: Google’s model page lists Content Credentials (C2PA) support, and its prompt guide says Veo applies safety filters. Confirm how those features affect your specific output and use case in the current documentation. (Veo model documentation)

Official references

Use Google’s Veo 3.1 model page, text-to-video guide, SDK overview, and authentication guide. If migrating from the Gemini Developer API preview, read Google’s Veo documentation and shutdown notice.

Sources

Google Gen AI SDK | Gemini Enterprise Agent Platform

Generate videos from text prompts | Gemini Enterprise Agent Platform

Veo 3.1 | Gemini Enterprise Agent Platform

Generate videos from references | Gemini Enterprise Agent Platform

Extend videos | Gemini Enterprise Agent Platform

Generate Videos from Images using Veo | Google Cloud Documentation

Get started with Gemini Enterprise Agent Platform

Configure application default credentials | Gemini Enterprise Agent Platform

Download objects | Cloud Storage

Video generation prompt guide | Gemini Enterprise Agent Platform

Generate videos with Veo 3.1 in Gemini API

Method: endpoints.predict | Gemini Enterprise Agent Platform

Contact us