Hey all! Excited to share that Veo 3 is now available via API, allowing you to build generative media apps powered by our state of the art model (with interleaved audio and video). You can learn more in our launch blog: Build with Veo 3, now available in the Gemini API - Google Developers Blog
import time
from google import genai
from google.genai import types
client = genai.Client()
operation = client.models.generate_videos(
model="veo-3.0-generate-preview",
prompt="Panning wide shot of a purring kitten sleeping in the sunshine under a waterfall",
)
while not operation.done:
time.sleep(20)
operation = client.operations.get(operation)
for n, generated_video in enumerate(operation.response.generated_videos):
client.files.download(file=generated_video.video)
generated_video.video.save(f"video{n}.mp4")
Learn more in the developer docs: Generate video using Veo | Gemini API | Google AI for Developers