Generate video using Gemini API with Veo2 model

I was trying to generate video using Veo2 in Gemini API following the example in https://ai.google.dev/gemini-api/docs/video#generate-from-text

The output I got in the colab is something like this , which shows an empty video_bytes and mime_type and an error uri https://generativelanguage.googleapis.com/download/v1beta/files/v816uahzbnr0:download?alt=media

what is wrong with this code?

Hi @Ji_Xu , Welcome to the forum.

Could you please confirm if your API is a paid one?

yes, I am using a tier1 GCP account. So should have veo2 quota.

Hey, it looks like there is limitation with the SDK returning the video_bytes and mime_type, which I have escalated to the engineering team. I checked, and even if it returns None, I am still able to generate the video.

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")