https://ai.google.dev/gemini-api/docs/video?example=dialogue
Veo 3 is Google's state-of-the-art model for generating high-fidelity, 8-second 720p videos from a text prompt, featuring stunning realism and natively generated audio. You can access this model programmatically using the Gemini API. Veo 3 excels at a wide range of visual and cinematic styles. To learn more about the available Veo model variants, see the Model Versions section.
Choose an example to see how to generate a video with dialogue, cinematic realism, or creative animation:
Dialogue & Sound Effects Cinematic Realism Creative Animation
import time
from google import genai
from google.genai import types
client = genai.Client()
prompt = """A close up of two people staring at a cryptic drawing on a wall, torchlight flickering.
A man murmurs, 'This must be it. That's the secret code.' The woman looks at him and whispering excitedly, 'What did you find?'"""
operation = client.models.generate_videos(
model="veo-3.0-generate-preview",
prompt=prompt,
)
# Poll the operation status until the video is ready.
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
# Download the generated video.
generated_video = operation.response.generated_videos[0]
client.files.download(file=generated_video.video)
generated_video.video.save("dialogue_example.mp4")
print("Generated video saved to dialogue_example.mp4")