googleapis / googleapis/python-genai

interactions.create: how do you set video fps? video_metadata is rejected / ignored on 2.11.0

Open
#2,727 3 comments 0 reactions 1 assignee Assigned to @kkorpal View on GitHub
priority: p3 type: question
Dominant language
Python
Stars
4k
Forks
1k
Avg merge
2d 11h
Merged PRs (30d)
40

Description

env: `google-genai==2.11.0` (current PyPI latest), Gemini Developer API (API key).

I'm trying to set a custom video frame rate on client.interactions.create, the way the cookbook shows https://github.com/google-gemini/cookbook/blob/main/quickstarts/Grounding.ipynb → "Custom frame rate":

`client.interactions.create(model=MODEL, input=[...], video_metadata=types.VideoMetadata(fps=2))
`
On 2.11.0 that raises client-side — video_metadata isn't a field on CreateModelInteraction:
`TypeError: create() got unexpected keyword argument(s): video_metadata. Use extra_body=... to send additional request body fields.`

Routing it through extra_body is rejected by the API in either casing:

```
extra_body={'video_metadata': {'fps': 2}} # 400 Unknown parameter 'video_metadata'
extra_body={'videoMetadata': {'fps': 2}} # 400 Unknown parameter 'videoMetadata'
```

Putting fps on the video input block (`{"type":"video","uri":..., "fps":2}`) or in generation_config is accepted but has no effect — `usage.total_input_tokens ` is identical with and without it, even at `fps=8`. It also can't be set at file-registration time (`File.video_metadata `comes back as read-only `{'videoDuration': ...}`).

Question: is there a supported way to set per-call video fps on interactions.create in 2.11.0? Is the cookbook's `video_metadata=` form targeting an unreleased SDK/API version? (`generate_content` still supports `Part.video_metadata.fps`.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.