VEO 3.1 - Last Frame Parameter Not Supported

Hi everyone,

I just tried the newly released VEO 3.1 model (veo-3.1-generate-preview), specifically using the first & last frame control which is great.

I literally used the code from the documentation, and also tried to copy the code from AI studio demo.

Unfortunately every time, I end up with the following error. Feels like the last frame parameter isn’t actually implemented yet.

Anyone experiencing a similar problem?

Cheers

Traceback (most recent call last):
  File "c:\Users\master_repo\Sandbox\VEO3\veo3.1_twoimages.py", line 18, in <module>
    operation = client.models.generate_videos(
        model="veo-3.1-generate-preview",
    ...<4 lines>...
        ),
    )
  File "C:\Users\master_repo\Sandbox\venv\Lib\site-packages\google\genai\models.py", line 6969, in generate_videos
    return self._generate_videos(
           ~~~~~~~~~~~~~~~~~~~~~^
        model=model,
        ^^^^^^^^^^^^
    ...<4 lines>...
        config=config,
        ^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\master_repo\Sandbox\venv\Lib\site-packages\google\genai\models.py", line 6389, in _generate_videos
    request_dict = _GenerateVideosParameters_to_mldev(
        self._api_client, parameter_model
    )
  File "C:\Users\master_repo\Sandbox\venv\Lib\site-packages\google\genai\models.py", line 1417, in _GenerateVideosParameters_to_mldev
    _GenerateVideosConfig_to_mldev(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getv(from_object, ['config']), to_object
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ),
    ^
  File "C:\Users\master_repo\Sandbox\venv\Lib\site-packages\google\genai\models.py", line 1363, in _GenerateVideosConfig_to_mldev
    raise ValueError('last_frame parameter is not supported in Gemini API.')
ValueError: last_frame parameter is not supported in Gemini API.
2 Likes

Yes, same here in Javascript. Only works without the lastFrame. Also tried uploading the lastFrame as image first with the files endpoint, but alas….

The documentation explicitly says it only works with the model: ‘veo-3.1-generate-preview’

Have you solved in some way? I have the same error when I use lastFrame parameter.