---
type: "post"
id: "introducing-file-slicing-controls-in-the-gemini-api-a8c2f8"
slug: "introducing-file-slicing-controls-in-the-gemini-api-a8c2f8"
title: "Introducing file slicing controls in the Gemini API"
description: "Google has added server-side file slicing to the Gemini API, letting developers select pages, spreadsheet ranges, and media segments instead of sending entire files for inspection."
retrieval_nugget: "Google has added server-side file slicing to the Gemini API, letting developers select pages, spreadsheet ranges, and media segments instead of sending entire files for inspection. For teams building document-aware agents, this offers a way to keep context focused and limit token use while avoiding some local rendering and extraction work."
published_at: "2026-11-23"
updated_at: "2026-11-23"
record_date: "2026-11-23"
date_kind: "published_at"
topics: ["google","gemini"]
entities: ["Google","Gemini API","Google AI Studio","Vertex AI","Vercel","LiteLLM"]
related_patterns: ["agent-ready-software-exposes-capabilities"]
novelty_label: "new_fact"
what_changed: "Google adds native file slicing controls and Office file support to the Gemini API, letting developers target document sections and reduce token costs."
prior_refs: ["https://newruntime.com/posts/introducing-tool-retrieval-in-the-gemini-api-67cef4/"]
source_url: "https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls"
source_urls: ["https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:introducing-file-slicing-controls-in-the-gemini-api-a8c2f8"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/introducing-file-slicing-controls-in-the-gemini-api-a8c2f8/","markdown":"https://newruntime.com/posts/introducing-file-slicing-controls-in-the-gemini-api-a8c2f8.md","json":"https://newruntime.com/posts/introducing-file-slicing-controls-in-the-gemini-api-a8c2f8.json"}
markdown_url: "https://newruntime.com/posts/introducing-file-slicing-controls-in-the-gemini-api-a8c2f8.md"
---

# Introducing file slicing controls in the Gemini API

## Retrieval answer

Google has added server-side file slicing to the Gemini API, letting developers select pages, spreadsheet ranges, and media segments instead of sending entire files for inspection. For teams building document-aware agents, this offers a way to keep context focused and limit token use while avoiding some local rendering and extraction work.

## Summary
Google has added server-side file slicing to the Gemini API, letting developers select pages, spreadsheet ranges, and media segments instead of sending entire files for inspection. For teams building document-aware agents, this offers a way to keep context focused and limit token use while avoiding some local rendering and extraction work.

## What happened
Google’s November 23, 2026 announcement says file slicing controls are available through the API in Google AI Studio and the Gemini platform, alongside native uploads for Microsoft Office and OpenDocument formats. Developers can pass PDFs, Office files, audio, and video directly to Gemini and specify which parts to process. Google says billing counts tokens only for the parts the model inspects. Existing file-size and page limits for uploaded files still apply.

The API exposes different controls for each file type. For PDFs, Office documents, and slides, a request can select a page range, low, medium, or high resolution, and content layers such as page text or page images. For spreadsheets, developers can select a worksheet and visible-cell range, choose resolution, and specify data, formulas, or visuals. Video processing can be restricted by start and end offsets, frame rate, resolution, and layers such as transcript, frames, or audio. Audio can be clipped by time interval. If processing options are omitted, documents and slides default to layout-preserving page images; spreadsheets include evaluated values, formulas, and sheet names across all tabs.

Google describes a multi-turn workflow: upload a file once through the Files API, reuse its URI across turns and tool calls, and let an agent request a slice inside a function response. Its example uploads a Word document, first scans every page as extracted text to find a revenue bridge chart, then requests page 3 at high resolution as an image to inspect the chart and footnotes. The same URI is reused for both interactions. This moves slicing, rendering, and tokenization to Google’s servers rather than requiring the client harness to run local PDF renderers, LibreOffice, or ffmpeg for this purpose.

Google says the capability works across all Gemini 4 models. The announcement cites early partner testing: Vercel reports that skimming a document page as extracted text used 14 times fewer tokens than rendering the whole PDF. LiteLLM reports reductions of 67% for a PDF and 33% for a workbook in its tests, and says slicing works through its Gemini routes without extra setup. These are partner-reported results, not a general performance guarantee. Google says the controls and expanded file support are available now through the API.

## What the archive adds
New Runtime covered the Gemini Decisions API on [November 11, 2026](https://newruntime.com/posts/gemini-decisions-api-fast-multimodal-decisions-b7faa0/), a separate multimodal API capability. File slicing is a new fact in Google’s developer API story: it changes how agents can inspect files, rather than how they make bounded decisions.

## Trend signal
This supports [agent-ready software exposes capabilities](https://newruntime.com/patterns/agent-ready-software-exposes-capabilities/): Gemini’s API gives an agent explicit controls for selecting file regions and content layers instead of treating a file as an indivisible input. The practical value depends on agents choosing useful slices and on teams checking whether the resulting token savings outweigh the extra inspection steps.

## Why now
The API change is available now, and Google frames it as a response to the local processing burden of whole-file ingestion: client harnesses may otherwise need renderers and per-user sandboxes to prepare documents and media. Server-side slicing also lets an agent inspect a file in stages rather than loading every page or frame up front.

## Why it matters
For an AI team, document handling can mean more than prompt design: local rendering, temporary frames, disk usage, and user-specific sandboxes add operational work. Moving selection and rendering into the API could simplify that part of a harness, while selective inspection gives teams a control surface for managing context and token use. The workflow also encourages staged retrieval: use text or a low-cost preview to find a relevant region, then request higher-resolution content only where needed.

The trade-off is that slicing does not establish that an agent will find the right evidence. A missed page, misleading text extraction, or poorly chosen cell range can produce an incomplete answer even when token use falls. Teams should treat selection as part of the agent’s behavior to evaluate, and verify that important conclusions can be traced back to the relevant page, cell, or media segment. Google’s announcement makes a specific capability available; it does not quantify production-wide savings or the accuracy impact of staged inspection.

## Limits and uncertainty
Google says the existing upload size and page limits remain, but does not quantify cost savings across workloads in the announcement. Vercel’s and LiteLLM’s token-reduction figures are partner reports from their own tests, not independently checked results or guarantees for other file mixes. The announcement does not report accuracy or retrieval-recall comparisons between sliced and whole-file processing. Teams will need to test whether text skimming reliably finds relevant charts, layouts, and evidence in their own documents, and account for any additional calls required by a staged workflow.

## Skill to build now
Build a two-pass file inspection path for one document-heavy task: first send extracted text or a low-resolution preview to locate a likely section, then request only that page or range at higher resolution. Log the selected slice, token use, and whether the final answer cites the necessary evidence. This directly tests Google’s example pattern against your files before making it a default for every request.

## Reader takeaway
Gemini API can now inspect selected regions of uploaded documents and media server-side, rather than forcing an agent to ingest every page or frame. Use staged inspection—skim first, zoom in where needed—but measure both token use and missed evidence before assuming it is cheaper or more reliable.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Google](https://newruntime.com/topics/google.md): Explore the google topic hub.
- topic hub: [Gemini](https://newruntime.com/topics/gemini.md): Explore the gemini topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
