Prices and model details on this page may have changed. For current rates, see the OpenLux pricing page.

Home / Gemini 3.6 Flash

How to Set Video fps and Clip Ranges for gemini-3.6-flash

If you want gemini-3.6-flash to sample a video faster or slower than the default 1 frame per second, or to look at only part of it, the field depends on which API you call. In the Interactions API (interactions.create, /v1beta/interactions), fps, start_offset and end_offset go inside the processing object of the video input block, and they only apply in static mode. Passing video_metadata there is rejected with 400 Unknown parameter. In the generateContent API, the same settings live in the videoMetadata object on the Part, and the offsets are duration strings ending in s. This page walks through both, based on Google's video understanding guide and API reference, and shows how to confirm the setting actually took effect.

First, check which API you are calling

The Gemini API has two ways to send video, and frame rate and clipping are written differently in each. Mixing them up leads to a 400 error or to a setting that is silently ignored. If your code calls client.interactions.create, or your request goes to /v1beta/interactions, you are using the Interactions API. If it calls generate_content, or the request goes to /v1beta/models/gemini-3.6-flash:generateContent, you are using generateContent.

Google's video understanding guide (https://ai.google.dev/gemini-api/docs/video-understanding, marked last updated 2026-10-13 UTC) writes its examples against the Interactions API. The generateContent fields are defined in the API reference (https://ai.google.dev/api/generate-content), under Part and VideoMetadata.

By default the model samples video at 1 frame per second. The guide warns that this may miss details in videos with rapid motion or quick scene changes. For slow-moving content such as lectures or meetings, lowering the frame rate reduces the tokens spent on frames.

Interactions API: put fps and offsets in the processing object

The guide says you can set custom frame rate sampling by passing an fps argument in the processing configuration object, and clip a video by specifying start_offset and end_offset in that same processing configuration object. processing is a key of the video block in the input array, next to uri and mime_type. It is not a top-level argument of interactions.create and it does not belong in generation_config.

The official examples are "processing": {"type": "static", "fps": 0.5}, which samples one frame every 2 seconds, and "processing": {"type": "static", "start_offset": 1200, "end_offset": 1500} for clipping. The guide states that these customization options are only supported when the video is processed in static mode, so keep type set to static.

Two gaps in the guide are worth knowing. It shows fps and clipping in separate examples, so if you put both in one processing object, confirm the result with the checks at the end of this page. It also writes start_offset and end_offset as plain integers without stating the unit, and it does not give an fps range for the Interactions API. The generateContent reference allows fps greater than 0 and up to 24, which is a reasonable guide, but rely on what the API actually returns.

In Python, input is a list of dictionaries in the official examples, so processing is simply another key in the video dictionary. Over REST, send the same JSON in the input array of the request body.

Why you get 400 Unknown parameter 'video_metadata'

In googleapis/python-genai issue 2727 (https://github.com/googleapis/python-genai/issues/2727), the reporter followed a Gemini cookbook example and passed video_metadata=types.VideoMetadata(fps=2) to interactions.create. On google-genai 2.11.0 the SDK stopped it first with TypeError: create() got unexpected keyword argument(s): video_metadata. Sending it through extra_body instead returned 400 Unknown parameter 'video_metadata', and the camelCase form returned 400 Unknown parameter 'videoMetadata'.

Replies in the issue explain that the cookbook was ahead of the production SDK and API schema, and the issue's assignee wrote that the video_metadata field is not yet supported in the Interactions API. The current video understanding guide documents the processing object instead, so remove video_metadata from Interactions requests and use processing.

The reporter also found that putting fps directly on the video block (next to uri) or in generation_config was accepted without an error, but usage.total_input_tokens stayed identical with and without it, even at fps=8. A setting that is silently ignored is harder to spot than a 400, so always run the token comparison described below after changing it.

The reverse mistake also exists: if you call generateContent, do not copy the Interactions processing object into it. The Part schema in the API reference uses videoMetadata. Keep the two APIs' fields separate.

generateContent: the videoMetadata field on Part

The API reference defines an optional videoMetadata object on Part and says it should only be specified while the video data is presented in inlineData or fileData. It has three fields: startOffset, endOffset and fps.

startOffset and endOffset use the Duration format: a duration in seconds with up to nine fractional digits, ending with s, for example "3.5s". To keep only minutes 20 to 25, write "startOffset": "1200s", "endOffset": "1500s". A bare number without the s, or the integer style from the Interactions examples, does not match this format.

fps is a number, described as the frame rate of the video sent to the model. If not specified it defaults to 1.0, and the allowed range is (0.0, 24.0]. Zero is therefore not valid; to sample less often, use a fraction such as 0.5 or 0.2, and the maximum is 24.

A REST video Part therefore contains fileData (mimeType and fileUri) or inlineData (mimeType and data), plus a sibling videoMetadata, for example "videoMetadata": {"fps": 2, "startOffset": "60s", "endOffset": "120s"}. For a single video with a text prompt, the guide recommends placing the text after the video.

How fps, resolution and tokens relate

The guide gives the static processing rates: when media_resolution is set to low, frames are tokenized at 66 tokens per frame, otherwise at 258 tokens per frame, and audio costs 32 tokens per second. That works out to about 100 tokens per second of video at the default (low) resolution and about 300 tokens per second at high resolution.

Frame tokens scale with the number of frames sampled. Dropping fps from 1 to 0.5 halves the frames and the frame tokens; raising it to 2 doubles them. Audio is counted per second of video, so fps does not change it. Clipping shortens both frames and audio.

Resolution is a separate setting. The guide states that media_resolution and processing are independent and can both be set on the same video input. In the generateContent reference, Part.mediaResolution takes a level field with values MEDIA_RESOLUTION_LOW, MEDIA_RESOLUTION_MEDIUM, MEDIA_RESOLUTION_HIGH and MEDIA_RESOLUTION_ULTRA_HIGH.

The guide also says a model with a 1M-token context window can process about 3 hours of video at the default low resolution and about 1 hour at high resolution. A higher fps uses more context for the same duration. Check the official model page for gemini-3.6-flash context limits, and the pricing page for cost.

Do not set fps when you use agentic mode

According to the guide, agentic video understanding is supported on Gemini 4 Argon, 3.8 Flash, 3.6 Flash and 3.5 Flash Lite. You turn it on with "processing": "agentic" on the video part in the input array, and the model then decides which parts of the video to look at instead of sampling at a fixed rate. Static remains the default.

Because fps, start_offset and end_offset are only supported in static mode, use static when you need a fixed frame rate or a fixed clip, and agentic when you want the model to choose. The guide does not say what happens if you add these options to an agentic block, so avoid combining them.

One request can hold several video blocks with different modes. The official example sends a lecture with processing set to agentic and an experiment video with processing set to static, then asks the model to compare them.

How to confirm the setting took effect

Step 1: take a short video of a few minutes and send the same prompt twice, once without fps and once with fps set to 0.5 (in processing for Interactions, in videoMetadata for generateContent). A 200 response with no 400 Unknown parameter means the field is in an accepted place.

Step 2: compare input tokens. For Interactions, the issue reporter compared usage.total_input_tokens; for generateContent, use promptTokenCount in usageMetadata. With half the frames, input tokens should drop noticeably. If both numbers are identical, you have hit the silently ignored case from issue 2727 and the field is in the wrong place.

Step 3: check clipping. Pick a video whose beginning and end are clearly different, clip to the second half, and ask what appears in the video. The answer should not describe anything outside the clip, and input tokens should be lower than for the full video.

For long videos, the guide notes that synchronous, non-streaming requests that hit backend retries under high demand can surface as unexpected 401 Unauthorized or timeout errors, and recommends streaming (stream=True) or background execution (background=True). If long videos fail with 401 while short ones work, look at this before suspecting your key.

Calling gemini-3.6-flash through OpenLux

In the OpenLux pricing API, gemini-3.6-flash is listed with the endpoint types gemini (native Gemini format) and openai (OpenAI-compatible format).

For the native Gemini format, set the base URL to https://api.openlux.ai; requests go to /v1beta/models/gemini-3.6-flash:generateContent, with the key in the x-goog-api-key header or the key query parameter. That path is generateContent, so use the videoMetadata fields on Part described above. videoMetadata is a native Gemini field; sending video through the OpenAI-compatible format is outside the scope of this page.

This page has not verified whether the Interactions API (/v1beta/interactions) or file URIs from the Google Files API work through the relay, and no video request was run with a real key. Start with a short video, apply the checks above, and confirm the token change before relying on it in production.

Create a key on the token page of the OpenLux console. For prices, refer to the official pricing page.

Still stuck? Full documentation and support are at visit the site.

More on this site

Get started

Check the current pricing record and validate Gemini 3.6 Flash in your integration.

Get a free API key

Official site: OpenLux official site

Last updated 2026-10-30 | Written and maintained by OpenLux.
Latency and pricing figures come from our own measurements. Where they differ from the vendor's site, the vendor's live page wins.