If you’re searching for a Veo 3 API key, first choose the API route. Google’s current Gemini API guidance says three Veo 3.1 preview model IDs—veo-3.1-generate-preview, veo-3.1-fast-generate-preview, and veo-3.1-lite-generate-preview—were shut down on October 22, 2026. It directs developers to Gemini Omni Flash or GA models on Gemini Enterprise Agent Platform. That notice confirms the retirement of those preview IDs; it does not establish that every Google API route for every Veo version is unavailable. (aistudio.google.com)
For the documented Agent Platform GA Veo 3.1 models, use Google Cloud project credentials through Application Default Credentials (ADC)—not a Gemini API key or an unrelated third-party gateway key. Google’s Agent Platform model page lists veo-3.1-generate-001 and veo-3.1-fast-generate-001 as GA. (docs.cloud.google.com)
Choose the credential for the route
| Route | Credential | What the current documentation says |
|---|---|---|
| Gemini Developer API | Gemini API key | The three named Veo 3.1 preview model IDs were shut down. Google’s migration notice points to Gemini Omni Flash or GA Veo models on Agent Platform. The notice does not establish that every Veo model or route is unavailable through the Gemini API. (aistudio.google.com) |
| Gemini Enterprise Agent Platform | Google Cloud identity and project, commonly configured with ADC | The documented Veo 3.1 Generate and Fast Generate models are GA on this platform. Their documented IDs are veo-3.1-generate-001 and veo-3.1-fast-generate-001. (docs.cloud.google.com) |
| Third-party video service or gateway | A credential issued by that provider | It applies to that provider’s service and terms. Do not assume it is a Google-issued credential or that it authorizes direct calls to Google. |
Bottom line: For the documented GA Veo 3.1 models on Agent Platform, configure Google Cloud authentication rather than looking for a Veo-specific API key. Google’s SDK documentation distinguishes Gemini Developer API key authentication from Agent Platform authentication using a project and location. (docs.cloud.google.com)
Set up Google Cloud access for Veo
-
Select or create a Google Cloud project. You need permission to use the selected project. Creating a project requires the Project Creator role; selecting an existing project does not require a specific role beyond access to it. (
docs.cloud.google.com) -
Enable the Agent Platform API. Google’s video-generation setup lists this as a prerequisite. Enabling APIs requires
serviceusage.services.enable; Google says this permission is included in Owner or can be granted through Service Usage Admin. (docs.cloud.google.com) -
Give the calling identity model-request permission. Google lists Agent Platform User (
roles/aiplatform.user) and Agent Platform Administrator as roles for generative AI features. The documented permission for making prompt requests isaiplatform.endpoints.predict. (docs.cloud.google.com) -
Set up ADC for local development. For example:
gcloud init gcloud auth application-default loginGoogle documents ADC as a supported authentication method and recommends it for production REST authentication. For a deployed workload, use its Google Cloud identity rather than copying local developer credentials into the application. (
docs.cloud.google.com) -
Check model availability and capacity before generating. The Agent Platform Veo page lists United States availability in
us-central1. For the listed models, it marks Fixed quota and Provisioned Throughput as supported, and Pay-as-you-go and Batch inference as unsupported. So a project, credentials, and API enablement alone do not establish that you have usable Veo capacity. Confirm that the selected model and project have an applicable quota or activated capacity before running the request. (docs.cloud.google.com)
If using Provisioned Throughput, Google documents an order-and-activation process: capacity is enabled after the order is approved and activated, subject to availability. The Veo model page does not explain the process for obtaining its Fixed quota option, so confirm that route’s quota status for your project rather than assuming ordinary pay-as-you-go billing will work. (docs.cloud.google.com)
Python starter: submit a Veo 3.1 generation and save the video
Google’s current Agent Platform notebook uses the Google Gen AI Python SDK with a project and location. Google’s SDK video-generation example documents the asynchronous operation pattern and saving a returned video. The code below combines those documented patterns with the Agent Platform GA model ID; it is an integration template, not a request tested for this article. Check the linked Agent Platform notebook and model documentation for changes before using it. (colab.research.google.com)
Install the SDK and set your project:
pip install --upgrade google-genai
export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
export GOOGLE_CLOUD_LOCATION="us-central1"
Then submit a text-to-video request, wait for the operation, check for a missing or failed result, and save the returned video:
import os
import time
from google import genai
client = genai.Client(
enterprise=True,
project=os.environ["GOOGLE_CLOUD_PROJECT"],
location=os.environ.get("GOOGLE_CLOUD_LOCATION", "us-central1"),
)
operation = client.models.generate_videos(
model="veo-3.1-generate-001",
prompt=(
"A slow cinematic tracking shot of a red fox walking through a "
"snow-covered pine forest at dawn, soft natural light."
),
)
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
if getattr(operation, "error", None):
raise RuntimeError(f"Video generation failed: {operation.error}")
response = getattr(operation, "response", None)
videos = getattr(response, "generated_videos", None) if response else None
if not videos:
raise RuntimeError("Generation completed without a video in the response.")
generated_video = videos[0]
client.files.download(file=generated_video.video)
generated_video.video.save("veo-output.mp4")
print("Saved veo-output.mp4")
This uses Google’s documented asynchronous SDK pattern: poll the operation until it completes, download the returned video file, and save it. The Agent Platform notebook confirms the SDK and project/location setup for that platform; the public SDK example documents the operation and file-save pattern. Because the retrieved SDK example uses a Gemini API preview model that Google has since retired, treat the combined Agent Platform sample above as a template and verify it against the current notebook and SDK documentation before relying on it in production. (colab.research.google.com)
Choose a documented Agent Platform model
| Model ID | Listed status | Listed output resolutions |
|---|---|---|
veo-3.1-generate-001 |
GA | 720p, 1080p, 4K |
veo-3.1-fast-generate-001 |
GA | 720p, 1080p |
veo-3.1-lite-generate-001 |
Preview | 720p, 1080p |
The Agent Platform documentation lists 4-, 6-, or 8-second video lengths, 24 FPS, and 16:9 or 9:16 aspect ratios for the model variants. Generate and Fast Generate list text-to-video and image-to-video, sound generation, and up to four output videos per prompt. The Lite section has conflicting statements about image input, so verify its image support before depending on that capability. These specifications are for the listed Agent Platform models; don’t assume they apply to a different Google API or a third-party service. (docs.cloud.google.com)
Troubleshooting: a credential alone does not guarantee access
If a request fails, check the API route, model ID, project, location, ADC identity, IAM permission, API enablement, and model capacity/quota. A credential that works for another Google model does not by itself prove that it can invoke Veo on this route. For Agent Platform prompt requests, Google documents aiplatform.endpoints.predict as the required permission. (docs.cloud.google.com)
A participant in the Google AI Developers Forum reported a 429 RESOURCE_EXHAUSTED response when calling a Veo preview model. That is an individual, dated report—not a universal diagnosis or a current Veo quota rule. The thread’s detailed free-tier quota metrics were for a separate image-generation error, so they should not be applied to Veo.
Production checks before you ship
- Use the right current route and model ID. The named Gemini API Veo 3.1 preview IDs were shut down; the Agent Platform page lists separate GA Veo 3.1 IDs. (
aistudio.google.com) - Verify access and capacity, not just authentication. Enable the Agent Platform API, ensure the calling identity has the documented prompt-request permission, and confirm an applicable quota or activated capacity. The Veo model page does not list Pay-as-you-go as supported for these models. (
docs.cloud.google.com) - Use ADC or another supported Google Cloud identity flow for the Agent Platform route. Do not expose credentials in client-side code or source control. (
docs.cloud.google.com) - Check the exact model’s region, output limits, and pricing information in its documentation. The model page lists United States availability in
us-central1; its quota wording is ambiguous, so this guide does not reinterpret it as a requests-per-minute limit. (docs.cloud.google.com) - Keep third-party credentials separate. A gateway may offer its own endpoint and key, but neither its key nor its pricing terms should be treated as Google Cloud credentials or Google’s usage terms.
Official documentation
- Veo 3.1 on Gemini Enterprise Agent Platform
- Generate videos on Agent Platform
- Agent Platform access control
- Purchase Provisioned Throughput
- Authenticate with REST on Google Cloud
- Google Gen AI Python SDK
- Google Cloud Veo 3.1 notebook
- Gemini API Veo migration notice
Status note: This guidance reflects the documentation available on November 10, 2026. Model availability, authentication details, quota, and pricing can change; check the documentation for your exact route and model before production use.
Sources
Generate videos with Veo 3.1 in Gemini API — Google AI Studio
Veo 3.1 — Gemini Enterprise Agent Platform
Generate videos from text prompts — Gemini Enterprise Agent Platform
Access control — Gemini Enterprise Agent Platform
Purchase Provisioned Throughput — Gemini Enterprise Agent Platform
Authenticate with REST — Google Cloud
Google Gen AI Python SDK documentation
Veo 3.1 Video Generation — Google Cloud notebook
Gemini API for Veo 3 for Students Free account — Google AI Developers Forum
