To find a specific topic in a long video, provide the video to Gemini 4 Hydrogen and set processing: "agentic" on the video input so the model can inspect the timeline as needed. For longer tasks, enable background execution and poll for the result.
Suitable tasks: Search long videos, locate clips related to a topic, and answer questions about video content.
Unsuitable tasks: Broad summaries of short videos, or checks that require every frame of the entire video to be processed. Google recommends considering the default static processing mode first for these tasks.
Applicable model version: The documentation's “Agentic video understanding” section lists Gemini 4 Hydrogen.
Applicable client, agent, or API: The Interactions API in the Google Gen AI SDK.
Recommended reasoning level and parameters: Set processing to "agentic" on the video input. For long videos or complex tasks, use background=True. The documentation does not specify a reasoning level.
The following question is quoted from the official example:
What are the three main arguments presented?
The official example uses it with a local lecture video. The Python request structure and settings are reproduced below; replace the local file path with the actual video path.
import time
from google import genai
client = genai.Client()
# Upload a long video
video_file = client.files.upload(file="path/to/lecture.mp4")
while video_file.state.name == "PROCESSING":
time.sleep(2)
video_file = client.files.get(name=video_file.name)
# Use agentic processing and background execution
interaction = client.interactions.create(
model="gemini-4-hydrogen",
input=[
{
"type": "video",
"uri": video_file.uri,
"mime_type": video_file.mime_type,
"processing": "agentic"
},
{"type": "text", "text": "What are the three main arguments presented?"}
],
background=True,
)
while interaction.status == "in_progress":
time.sleep(5)
interaction = client.interactions.get(interaction.id)
print(interaction.output_text)This is an official code example, not a test conducted for this note; the documentation does not provide the model's answer to the example. To locate a specific event, you can replace the question with one of your own and ask for timestamps. This adaptation is suggested here; it is not an official prompt.
Prepare a relatively long video file. The example uses a local lecture.mp4 and uploads it to the Files API.
Poll the file status until it is no longer PROCESSING.
Call client.interactions.create, set the model to gemini-4-hydrogen, set processing="agentic" on the video input, and put the question in the text input.
For a long-running task, set background=True and, as in the example, poll with client.interactions.get(interaction.id) until the status is no longer in_progress.
Read interaction.output_text. To confirm that dynamic navigation occurred, check whether interaction.steps contains processing_call and processing_result.
Official documentation says the default video processing mode is static and samples one frame per second. Agentic mode navigates the timeline dynamically based on the prompt and reads transcripts or video clips as needed.
Google recommends Agentic for videos longer than 5–10 minutes, needle-in-a-haystack retrieval, and questions about a specific moment or topic. For short videos or broad questions, the additional reasoning and tool calls may increase cost and latency.
The official table says Agentic processing for long videos can reduce video input tokens by up to 88%. This is a documented upper bound and does not mean every request will achieve it.
Gemini 4 Hydrogen is listed as a supported model in the model table in the “Agentic video understanding” section. The later “Technical details about videos” section does not list Hydrogen among the models that support Agentic. This note follows the model table's explicit listing while preserving this discrepancy in the documentation.
The example's question, model name, settings, and polling logic come from the page's code. No model output is recorded or inferred.
The example uses a local file and the Files API. Google also says YouTube URLs can be used as video input, but that feature is in preview; this example does not use a YouTube URL.
Agentic performs multiple inspections. For unstable network connections, Google recommends background execution or streaming.
The token savings figure on the page is an upper bound; it should not be treated as a fixed cost or a quality guarantee.
The processing_call and processing_result steps produced by Agentic can be used to confirm that video navigation occurred. The page says clients do not need to return responses for these steps.
Source page: Google AI Studio's “Video understanding,” specifically the “Agentic video understanding” and “Set the processing mode” sections. The Python example was selected during collection. The path/to/lecture.mp4 in the code is a placeholder path and must be replaced with an accessible video file. This note describes a documented workflow, not an execution result.
Gemini 4 Hydrogen