Gemini API lets developers load only parts of large files

Google's new server-side slicing controls let apps request specific pages, cell ranges or media clips, with tokens billed only for what the model inspects.

AIPublished
Image published by Google Blog with “Introducing file slicing controls in the Gemini API”
Image: Google Blog · Source
What happened
On 23 November Google added file slicing controls to the Gemini API in Google AI Studio and the Gemini platform.
What’s new
Developers can ask Gemini to read chosen pages, spreadsheet ranges, layers or media segments, and can now upload Office and OpenDocument files natively.
Why it matters
Google says only the inspected portions are billed, which could cut token costs and remove the need for local file-rendering tools in agent setups.

Google has added file slicing controls to the Gemini API, available from 23 November through Google AI Studio and the Gemini platform. Instead of sending a whole file to the model, developers can now point Gemini at particular pages, spreadsheet cells, video or audio segments, or content layers, and Google says tokens are charged only for the portions the model actually inspects. The same launch adds native upload support for Microsoft Office and OpenDocument formats.

The controls vary by file type. For PDFs, Office and OpenDocument documents and slides, developers can set a page range, pick low, medium or high resolution, and choose extracted page text or page images. Spreadsheets can be narrowed to a worksheet tab and cell range, with data, formulas and visuals as selectable layers. Video can be clipped by time, with adjustable frame rate and resolution and a choice of transcript, frames or audio; audio can be clipped by time. If no options are set, documents default to page images that preserve layout, and spreadsheets include values, formulas and sheet names from every tab.

Files are uploaded once through the Files API and their URI can be reused across turns, including inside function responses, so an agent can decide what to examine next. Google pitches this as a way to skim cheaply before spending high-resolution tokens on specific pages, and to avoid running tools such as LibreOffice or ffmpeg on the client side.

The feature works with all Gemini 4 models, but Google says existing limits on file size and page count still apply.