Google on Monday announced file slicing controls for the Gemini API, which lets developers choose which parts of a file the model reads. The company said the change keeps the model focused on relevant content and lowers token costs for large files. Tokens are the units AI services use to measure and bill the amount of data a model processes.
According to Google, the controls are available now through Google AI Studio and the Gemini platform. The company also added native upload support for Microsoft Office and OpenDocument formats. Developers can now pass PDFs, Office files, audio and video directly to the API.
Google said slicing happens on its servers. Developers can upload a file once through the Files API and reuse its web address, called a URI, across several requests and tool calls. An AI agent can also name the parts of a file to inspect inside a function response, Google said.
The company said that without such controls, agents often must run software such as LibreOffice, PDF renderers and ffmpeg on the developer’s side to cut up large files. Google said this uses extra memory, fills local disks with extracted frames and forces enterprise platforms to keep separate sandboxes for each user. With server-side slicing, the API renders and tokenizes each file itself, Google said.
The options differ by file type. For documents and slides, developers can pick a page range, a resolution of low, medium or high, and a content layer of page text or page image. For spreadsheets in .xlsx, .xls or .ods format, they can pick a worksheet tab and cell range, a resolution, and layers for data, formulas and visuals.
For video, developers can set start and end times, frames per second, a resolution of low or high, and layers for transcript, frames or audio. For audio, they can clip a time interval. If no options are given, documents and slides default to page images that keep their layout. Spreadsheets default to calculated values, formulas and sheet names across all tabs.
Google described a workflow it calls skimming first and then zooming in. A developer can have the model scan a whole document cheaply as extracted text to find the right section. The developer can then reuse the same file address to examine one page at high resolution. Google’s example uses a Word document and two Gemini 4 models, named gemini-4-hydrogen and gemini-4-neon.
Google said the slicing works across all Gemini 4 models. It said existing file size and page limits still apply to uploaded files.
The company said gateway and SDK partners tested the controls before launch and cut prompt token spending in production. The text of the announcement did not name those partners or give figures for the savings. Google also did not state prices or say how large the token savings would be for typical files.
Google pointed developers to its documentation to get started.