Hey folks : ) Excited to share that the Veo 3 API is now available. It brings our SOTA model with native audio generation (first of its kind) to devs through a simple API. You can read our launch blog post here: https://developers.googleblog.com/en/veo-3-now-available-gemini-api/
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")
Happy building : ) and please reach out if you run into any issues.