Gemini API adds file slicing, so apps pay only for the pages, cells and clips the model reads

· Google

Gemini API adds file slicing, so apps pay only for the pages, cells and clips the model reads

Developers can now tell the Gemini API which pages, spreadsheet ranges or video segments to load from an uploaded file, and are billed only for those parts. The API also now accepts Microsoft Office and OpenDocument files directly.

Key numbers

What happened

On 23 November 2026, Google added file slicing controls to the Gemini API in Google AI Studio and the Gemini platform. Instead of sending a whole file to the model, a developer (or an agent) can ask for just the parts that matter. Only those parts are billed.

Source: Google — Introducing file slicing controls in the Gemini API

What you can slice

A file is uploaded once through the Files API and can be reused across turns. An agent can request a different slice inside a function response, so it can skim cheaply first and then zoom in on the charts or frames it needs.

Defaults: if no options are given, documents are sent as layout-preserving page images and spreadsheets include values, formulas and sheet names from every tab, so it is worth setting slices explicitly on large files.

Slicing works with all Gemini 4 models. Existing file size and page limits still apply.

Source: https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/

Tags: Developers, Documents, Gemini API, Google AI Studio, Token costs

Read on AI Gist