All insights

Video generation

Google Veo 3 Prompt Guide: Examples and a Veo 3.1 API Workflow

Learn a flexible Veo prompt structure, how to refine visual and audio directions, and how to generate and retrieve a video with the Veo 3.1 production API on Gemini Enterprise Agent Platform.

Illustration for Google veo 3 prompt guide

The short answer

A useful Veo prompt describes the shot, subject, action, setting, visual style and—if wanted—dialogue or other audio. Treat these as flexible ingredients, not required syntax. Google’s Veo 3 prompt guide recommends experimenting with framing and camera motion, style, lighting, character details, location, action and dialogue.

For API use, distinguish Veo 3 from Veo 3.1. Google lists the original veo-3.0-generate-001 endpoint as retired and recommends migrating to Veo 3.1. The production API example below uses Veo 3.1 model veo-3.1-generate-001 on Gemini Enterprise Agent Platform—not Flow or the Gemini API preview. (Veo 3 model page; Veo 3.1 model page)

A flexible Veo prompt template

Use the parts that matter for your scene:

Shot and camera: [framing and camera movement]. Subject: [specific appearance or object]. Action: [what happens, in a clear sequence]. Setting: [where, when, and relevant surroundings]. Style and lighting: [visual aesthetic, palette, mood, light]. Audio: [dialogue, sound effects, ambience, or music, if wanted].

This is a writing aid, not a special API format. Google’s Veo 3 prompt guide encourages experimenting with prompt elements, and Google Cloud’s general video-prompt guide says you do not need every element in every prompt. (Veo 3 prompt guide; general video prompt guide)

Example prompt

Illustrative prompt, not a reported or guaranteed generation result:

Medium shot of a bicycle mechanic in a navy apron tightening the front wheel of a red commuter bike. The mechanic checks the wheel, spins it once, then gives a satisfied nod. Inside a small neighborhood repair shop on a rainy afternoon; tools hang neatly on the wall and rain streaks the front window. Soft window light, warm practical lamps, naturalistic documentary look, muted reds and brass tones. Audio: light rain outside, a ratchet turning, and quiet shop ambience; no music.

The prompt gives the model one main subject and a readable action, then adds setting, framing, style and distinct audio cues. If a result misses the intent, revise the part that failed: make the action more concrete, name the framing, simplify competing instructions, or describe the ambience separately. This is a practical iteration method, not a guarantee about how the model will respond.

Directing visuals and audio

  • Put the subject and action in plain language. Specific character details and observable actions give the scene a clearer target than broad requests such as “make it cinematic.” Google’s Veo 3 guide recommends describing character details and actions. (Veo 3 prompt guide)
  • Name a shot or camera move when it matters. Try familiar directions such as “medium shot,” “close-up,” “slow pan,” or “camera tracks beside the cyclist.” Google’s general Veo prompt guide cautions that some advanced camera angles and lenses may not be officially supported and that reliability can vary. Treat intricate directions as creative guidance, not guaranteed controls. (general video prompt guide)
  • Make style and lighting concrete. “Warm light from a workshop lamp” or “cool overcast window light” is more actionable than “nice lighting.” Google’s Veo 3 guide recommends describing style and lighting. (Veo 3 prompt guide)
  • Separate spoken words from other sound. If dialogue matters, identify the speaker and line. Then describe ambience or sound effects separately—for example, rain outside and a ratchet turning. Prompt wording does not guarantee exact speech or synchronization. (Veo 3 prompt guide)

Submit a prompt through the current production API

The original Veo 3.0 Agent Platform endpoint is retired. For a new Agent Platform integration, use Veo 3.1’s GA model ID, veo-3.1-generate-001. Google’s model catalog lists it as available in the United States in us-central1; check the live model documentation for availability applicable to your project. (Veo 3 model page; Veo 3.1 model page)

Set up your project and credentials

  1. Select or create a Google Cloud project, link it to an active billing account, and enable the Gemini Enterprise Agent Platform API. Google Cloud requires billing to be enabled for project resources, and the video-generation setup page describes project selection and enabling the API. (Cloud Billing; text-to-video setup)
  2. For local development, configure Application Default Credentials (ADC). Google documents gcloud auth application-default login as one way to make local credentials available to client libraries. (ADC setup)
  3. Install the Google Gen AI Python SDK, then set your project and region. This example passes both explicitly to the client, avoiding environment-variable ambiguity:
pip install --upgrade google-genai
gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="us-central1"

Generate, poll, and retrieve an MP4

The following Python example uses the current SDK source-object form, submits a text prompt, polls the long-running operation, and copies the returned Cloud Storage video URI to a local MP4. Replace the bucket URI with a bucket you can write to and access. The selected 16:9, 720p, 8-second configuration is within the model catalog’s listed options. (Google Gen AI SDK; Veo 3.1 model page; Google’s Veo 3.1 sample notebook)

import os
import subprocess
import time

from google import genai
from google.genai import types

project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
location = os.environ.get("GOOGLE_CLOUD_LOCATION", "us-central1")
client = genai.Client(
    enterprise=True,
    project=project_id,
    location=location,
)

prompt = (
    "Medium shot of a bicycle mechanic tightening the front wheel of a red bike "
    "in a small repair shop on a rainy afternoon. Soft window light, "
    "naturalistic documentary look. Audio: rain outside and a ratchet turning; no music."
)

operation = client.models.generate_videos(
    model="veo-3.1-generate-001",
    source=types.GenerateVideosSource(prompt=prompt),
    config=types.GenerateVideosConfig(
        aspect_ratio="16:9",
        duration_seconds=8,
        number_of_videos=1,
        resolution="720p",
        generate_audio=True,
        output_gcs_uri="gs://YOUR_BUCKET/veo-output/",
    ),
)

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

if operation.error:
    raise RuntimeError(operation.error)

videos = operation.response.generated_videos if operation.response else None
if not videos:
    raise RuntimeError("Generation completed without a video; inspect the operation response.")

video_uri = videos[0].video.uri
subprocess.run(
    ["gcloud", "storage", "cp", video_uri, "veo-output.mp4"],
    check=True,
)
print("Saved veo-output.mp4")

The SDK documents client initialization for Agent Platform and its current GenerateVideosSource type; Google’s notebook demonstrates the Veo 3.1 generation workflow and copying a returned video URI with gcloud storage cp. The model page lists the example’s selected output options. If you choose a different duration, aspect ratio, resolution, or audio setting, check the current model documentation for compatibility. (SDK documentation; sample notebook; model specifications)

Which version and channel does this guide cover?

  • Prompt advice: Google DeepMind’s prompt page is specifically about Veo 3. (Veo 3 prompt guide)
  • API workflow: The SDK example and model ID above are for Veo 3.1 on Gemini Enterprise Agent Platform, not Veo 3.0 or the Gemini API preview. (Veo 3.1 model page; text-to-video guide)
  • Keep specifications tied to their version and channel. The Agent Platform catalog lists Veo 3.1’s model ID, launch stage, region, and supported settings; those details are not proof that every Veo version or API channel behaves identically. (Veo 3.1 model page)

Sources

How to create effective prompts with Veo 3 — Google DeepMind

Veo 3 | Gemini Enterprise Agent Platform | Google Cloud Documentation

Veo 3.1 | Gemini Enterprise Agent Platform | Google Cloud Documentation

Generate videos from text prompts | Gemini Enterprise Agent Platform | Google Cloud Documentation

Set up Application Default Credentials — Google Cloud

Cloud Billing documentation — Google Cloud

Google Gen AI SDK documentation

Veo 3.1 Video Generation — Google Cloud sample notebook

Contact us