Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Veo2 AttributeError: 'Models' object has no attribute 'generate_videos' #728

@bnicholl

Description

@bnicholl

Description of the bug:

following this tutorial

https://ai.google.dev/gemini-api/docs/video

when I run this code


import time
from google import genai
from google.genai import types

client = genai.Client(api_key='###')  # read API key from GOOGLE_API_KEY

operation = client.models.generate_videos(
    model="veo-2.0-generate-001",
    prompt="Panning wide shot of a calico kitten sleeping in the sunshine",
    config=types.GenerateVideosConfig(
        person_generation="dont_allow",  # "dont_allow" or "allow_adult"
        aspect_ratio="16:9",  # "16:9" or "9:16"
    ),
)

I get the error

AttributeError: 'Models' object has no attribute 'generate_videos'

Actual vs expected behavior:

instead of the error, I should be receiving a link to the video file

Any other information you'd like to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions