Cut Long-Form Video Analysis Costs Up to 66% in Gemini API with processing="agentic"
A practical developer guide to Gemini API's agentic video processing mode based on Google for Developers, covering Python code examples, supported models, and u
Google for Developers (@googledevs) has introduced an agentic video understanding mode (processing="agentic") in the Gemini API, reducing token consumption by up to 88% and cutting long-form media analysis costs by up to 66%.

Image source: Google for Developers (@googledevs)
Conventional video understanding pipelines ingest entire videos via uniform static decoding (typically 1 FPS), flooding the context window with raw frame data. When analyzing a 45-minute recording, this approach burns token budgets rapidly while diluting model attention across thousands of uninformative static frames.
The agentic processing mode solves this bottleneck. Instead of dumping full pixel payloads upfront, the client passes a lightweight pointer reference. Gemini then runs an iterative Think-Act-Observe loop on the server, invoking tool calls to fetch only the exact temporal slices needed to resolve the prompt.
How Agentic Video Understanding Works
The architectural leap rests on selective temporal slicing via server-side tool calls rather than indiscriminate brute-force decoding.
- Transcript-First Verification: Inspects timestamped audio transcript tokens first to determine whether a vision tool call is necessary.
- Temporal Zooming with Adaptive FPS: Drops sampling rates down to 0.1 FPS to skim coarse footage, then ramps up to 5–10 FPS for high-velocity motion or precise object transitions.
- Targeted Audio Extraction: Slices audio streams strictly around relevant timestamps.
According to Google benchmarks on Gemini 3.7 Flash, this workflow yields up to 88% fewer tokens per request, slashes analysis costs by up to 66% on long-form media, and improves accuracy by up to 7% on fine-grained visual reasoning tasks.
Support spans across Gemini 3.8 Flash, 3.7 Flash, 3.6 Flash, and 3.5 Flash-Lite.
Implementation with Python SDK (google-genai)
You can activate this mode by supplying "processing": "agentic" inside the video input dictionary using the official google-genai SDK.
1. Single Uploaded Video
from google import genai
client = genai.Client()
# Upload video via Files API
video_file = client.files.upload(file="meeting_recording.mp4")
response = client.interactions.create(
model="gemini-3.8-flash",
input=[
{
"type": "video",
"uri": video_file.uri,
"mime_type": video_file.mime_type,
"processing": "agentic",
},
"Summarize the key release dates from the roadmap slide presented around minute 42.",
],
)
print(response.text)
2. Mixed-Mode Multi-Video Queries
Pipelines combining a long reference archive with a short query clip can mix processing modes within the same request. Assign agentic to a 45-minute match archive and static (default uniform 1 FPS) to a 10-second query clip.
response = client.interactions.create(
model="gemini-3.8-flash",
input=[
{
"type": "video",
"uri": full_match_file.uri,
"mime_type": full_match_file.mime_type,
"processing": "agentic",
},
{
"type": "video",
"uri": clip_file.uri,
"mime_type": clip_file.mime_type,
"processing": "static",
},
"Identify the exact timestamp in the full match video where the foul shown in the short highlight clip occurred.",
],
)
3. Public YouTube URLs
Direct public YouTube URLs are supported natively without manual pre-downloading or Files API uploads:
response = client.interactions.create(
model="gemini-3.8-flash",
input=[
{
"type": "video",
"uri": "https://youtu.be/7Z5Vy9JBANs",
"processing": "agentic",
},
"Locate the start and end timestamps where the live coding demo takes place.",
],
)
When to Use and Billing Considerations
Agentic processing is an opt-in parameter and does not replace static processing for every scenario.
- Use
processing="agentic": Videos longer than approximately 5 minutes, targeted timestamp searches, fast-motion verification, and tasks combining audio transcript lookups with visual confirmation. - Use
processing="static": Clips under 5 minutes, latency-critical applications, or full-clip frame precision requirements. Because agentic processing introduces thinking tokens and tool round-trips, static ingestion remains faster and cheaper on short clips. - Billing Mechanics: Standard base-model token rates apply to materialized media tokens (the lightweight reference pointer plus fetched frame/audio slices) along with thinking and output tokens. The feature integrates with implicit/explicit context caching and the Gemini Batch API (which provides a 50% discount against standard rates).
Original source
- Google for Developers Official X (@googledevs): 2026-10-20 Announcement Post
- Google for Developers Developer Article: Agentic Video Guide
- Google Official Blog: Introducing Agentic Video in Gemini
- Gemini API Official Documentation: Video Understanding Documentation