Image: Google
Google's Gemini API can now read only the parts of a file a developer asks for. The new file slicing controls let a request name a page range in a PDF, a tab and cell range in a spreadsheet, or a time clip in audio and video, and the API loads that slice server-side. Google says it bills tokens only for the parts Gemini inspects, and announced it on X and in a blog post.
PDFs and slides take a page range, resolution and a choice of text or page images. Spreadsheets take a sheet index and cell range, with data, formulas and visuals as layers. Video adds time clips, frame rate and a choice of transcript, frames or audio.
The workflow suits agents. Upload a file once through the Files API, reuse the URI across turns, and let the agent request a slice inside a function response. Google suggests skimming a document cheaply as text, then spending high-resolution tokens on the one page that matters. That also spares local LibreOffice or ffmpeg setup.
Early partner numbers are promising. LiteLLM said slicing cut prompt tokens by 67 percent for a PDF and 33 percent for a workbook, and Vercel said extracting text from a page used 14 times fewer tokens than rendering the whole PDF. Those are partner claims, not independent tests.
It works across all Gemini 4 models, in AI Studio and the Gemini platform. Defaults matter: omit the options and documents load as full page images, while spreadsheets include every tab. TechcityAuthority has also covered Google's voice editing API.
Introducing file slicing controls in the Gemini API
— Google AI Studio (@GoogleAIStudio) November 24, 2026
The Gemini API now features native file slicing controls, allowing developers to specify targeted pages, sheet ranges, and media segments for the model to load server-side. This capability reduces token costs for large files.

Comments