Google lets developers send Gemini selected file sections to reduce token costs
The controls move file selection and rendering onto Google’s servers. Developers can choose not just a section, but whether Gemini sees text, images, formulas or other layers.
Launched November 23, 2026, Google’s Gemini API file-slicing controls let developers reuse an uploaded file while requesting specific pages, spreadsheet ranges, or media intervals in different representations. Google says billing covers the content Gemini inspects, but it does not promise a particular saving for each file, and upload-size and page limits still apply. The controls also support native Office and OpenDocument uploads and work across Gemini 4 models; developers must set processing options themselves to avoid broad default inputs.
01
Developers can reuse a Files API URI across turns and request a different slice without uploading the file again.
02
PDF, Office, and OpenDocument pages can be loaded as extracted text or layout-preserving images; spreadsheets can target data, formulas, or visuals.
03
Video requests can specify time intervals and frame rates, while audio requests can be clipped to a selected interval.
Google’s new file controls let developers narrow what Gemini reads, rather than pay to process every part of a large file. Launched November 23, 2026, the Gemini API feature selects pages, cells and media segments on Google’s servers. The company says token billing covers only what Gemini inspects—not everything in the upload.
The release is available through the API in Google AI Studio and the Gemini platform. It also adds native uploads for Microsoft Office and OpenDocument files, covering documents, presentations and spreadsheets alongside PDFs, audio and video. Developers can pass those files directly to the API instead of first converting them into plain text.
Choose the section—and what Gemini sees
The controls separate two choices: which portion of a file to inspect, and which representation of that portion to load. A page can arrive as extracted text or an image preserving its layout. A spreadsheet can expose data, formulas or visuals. Video can supply a transcript, frames or audio, depending on the task.
Documents and slides: Select starting and ending pages in PDFs, Office files and OpenDocument formats. Choose low, medium or high resolution, with controls for page text and page images rather than treating every page as one fixed input.
Spreadsheets: Select a worksheet tab and a cell range in .xlsx, .xls or .ods files. Resolution settings run from low to high, while separate content layers let the request target data, formulas and visuals.
Video: Set start and end times, adjust the number of frames inspected per second, and choose low or high resolution. Transcript, frame and audio controls determine which kinds of information from the selected interval reach Gemini.
Audio: Set start and end times to clip a recording to the interval needed for a request. This gives developers a way to direct processing at a selected passage instead of submitting the whole recording for inspection.
One upload, several passes
Files uploaded through the Files API receive a reusable reference, or URI. Developers can use that same reference across conversation turns and tool calls, changing the requested slice without uploading another copy. Agents can also specify which parts to inspect directly inside a function response—the message a tool sends back to the model.
Google illustrates the workflow with a Word report. The first request skims every page as extracted text to locate a revenue chart. A second request reuses the file reference and loads page three at high resolution to read the chart and footnotes. The example demonstrates selective inspection, not a measured savings guarantee for every document.
The API handles slicing, rendering and conversion into model tokens on Google’s servers. Google contrasts this with agent applications that run LibreOffice, PDF renderers and ffmpeg locally to prepare files. Its pitch is less local memory use, fewer extracted files on disk and less infrastructure devoted to file preparation.
Defaults still matter
Omitting processing options does not mean the API automatically chooses the cheapest text-only view. Documents and slides default to layout-preserving page images. Spreadsheets include evaluated values, formulas and sheet names across all tabs. Developers seeking narrower inputs need to set the relevant processing options rather than assume that uploading a file activates selective reading.
Native file slicing works across all Gemini 4 models. Developers can use the controls with that model family rather than switch to a dedicated file-processing model.
Sources
blog.googleIntroducing file slicing controls in the Gemini API
Reader comments
Newest comments first. Replies stay oldest first.