All insights

Video generation

Veo 3 API: Google Access Route, Python Example, and Production Checks

Learn how to call Google’s Veo 3.1 API through Gemini Enterprise Agent Platform, poll for a generated video, review supported controls, and check what pricing information remains unavailable.

Illustration for Veo 3 api

For a Google API integration, use Veo 3.1 on Gemini Enterprise Agent Platform (formerly Vertex AI). The standard model ID is veo-3.1-generate-001; Google lists it as generally available in the U.S. region us-central1. The Gemini API’s Veo 3.1 preview IDs were shut down on October 22, 2026, so don’t use those retired preview IDs for a new integration. [1][2]

A third-party site that markets a “Veo API” does not, by itself, establish that it is Google’s API. Verify the provider, API documentation, terms, and pricing before sending it credentials or production data.

Make a first text-to-video request with Python

Google’s Python example uses the Google Gen AI SDK with the Agent Platform client configuration. To follow this path, use a Google Cloud project, enable the Agent Platform API, configure Application Default Credentials (ADC), and provide a Cloud Storage output location. Google recommends ADC for this platform; the project setup also requires billing to be enabled. [3][4]

The following minimal workflow follows Google’s documented SDK pattern for submitting a request, polling its long-running operation, and reading the generated video’s Cloud Storage URI. Replace the project ID and bucket path with your own values:

import time
from google import genai
from google.genai.types import GenerateVideosConfig

client = genai.Client(
    enterprise=True,
    project="YOUR_PROJECT_ID",
    location="us-central1",
)

operation = client.models.generate_videos(
    model="veo-3.1-generate-001",
    prompt="A paper boat drifting down a sunlit stream, close-up, gentle camera movement.",
    config=GenerateVideosConfig(
        output_gcs_uri="gs://YOUR_BUCKET/veo-output/"
    ),
)

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

if not operation.response or not operation.result.generated_videos:
    raise RuntimeError("Video generation completed without a video result")

video_uri = operation.result.generated_videos[0].video.uri
print(video_uri)

Install the google-genai SDK and check its current migration guidance before upgrading or pinning a version. The code above is for the Agent Platform client (enterprise=True), not the retired Gemini API preview route. The result shown is a gs:// URI; use the Google sample notebook’s output helper or your Cloud Storage workflow to copy or consume the file. [3][5][6]

Veo 3.1 inputs, outputs, and limits

For veo-3.1-generate-001, Google’s model documentation lists these workflow-relevant capabilities and specifications: [1]

  • Generation modes: text-to-video, image-to-video, first-and-last-frame generation, video extension, and reference-image workflows.
  • Audio: sound generation is supported; audio input is not listed as supported.
  • Duration: 4, 6, or 8 seconds. Reference-image-to-video is limited to 8 seconds.
  • Aspect ratios: 16:9 and 9:16.
  • Output resolution: 720p, 1080p, or 4K.
  • Reference images: up to three images of one subject for supported reference-image workflows. [7]
  • Video extension: supported; Google’s extension guidance says the input video must be 1–30 seconds and the extension adds 7 seconds, for up to 37 seconds total. [8]
  • Listed U.S. region: us-central1.

Google’s model page labels the regional online prediction quota “50 tokens per minute.” That wording does not give a clear request allowance for capacity planning, so check the effective quota for your project rather than treating it as a usable per-minute generation limit. [1]

Production access and cost

Google lists Provisioned Throughput and fixed quota as supported consumption options for the standard model. It lists pay-as-you-go and batch inference as unsupported. Confirm which access option and capacity or quota terms apply to your project before planning a production launch. [1]

The pricing information available here does not establish a rate and billing unit for veo-3.1-generate-001 under those supported options, so a per-video cost cannot be calculated from it. Check the model’s linked pricing information and your project’s applicable Google Cloud terms before budgeting. Do not substitute a Gemini consumer subscription, another model’s price, or a third-party service’s credits for this model’s charges. [1][9]

Before launch, verify your project’s effective quota or throughput arrangement, output-storage access, applicable charges, and the terms governing the prompts, images, and generated media you handle.

Bottom line

For Google’s Veo integration, use Agent Platform with model ID veo-3.1-generate-001; the Python example above shows the documented request, operation polling, and result-URI pattern. Check the model’s specifications and project-specific capacity and pricing before treating it as production-ready.

Sources

Veo 3.1 — Gemini Enterprise Agent Platform

Generate videos with Veo 3.1 in Gemini API

Veo 3.1 Video Generation — Google Cloud sample notebook

Get started with Gemini Enterprise Agent Platform

google-genai — Python Package Index

Generate Videos from Images using Veo — Google Cloud code sample

Generate videos from references — Gemini Enterprise Agent Platform

Extend videos — Gemini Enterprise Agent Platform

Agent Platform Pricing — Google Cloud

Contact us