Gemini API adds server-side file slicing so agents read only the pages, cells and frames they need
The Gemini API now accepts file slicing parameters, so developers can ask the model to read only specific PDF pages, spreadsheet cells, video segments or audio clips, and pay tokens only for the parts the model actually inspects.
Why it matters
Slicing happens server-side: a file is uploaded once through the Files API and the returned URI is reused across turns and tool calls. Requests can set page ranges, resolution, worksheet tab and cell range, frame rate for video, and which content layers to read, such as page text, page images, formulas or transcripts.
Google says the feature works across all Gemini 4 models and that existing file size and page limits still apply. Native upload for Microsoft Office and OpenDocument files is included, which removes the workaround of running LibreOffice, PDF renderers or ffmpeg inside the client harness to render and cut files locally.
According to Google, gateway and SDK partners tested the controls before launch and cut prompt token spend in production. When processing options are omitted, documents and slides default to layout-preserving page images, and spreadsheets include values, formulas and sheet names across all tabs. The controls are available now in Google AI Studio and the Gemini platform.