TechInBrief

Gemini API adds file slicing: read only the parts you need, pay only for what you read

Ảnh minh họa bài viết TechNews
Illustration

The problem: sending a whole file to read a few pages

Until now, getting Gemini to read a document usually meant sending the entire file — even if you only needed a few pages from a hundred-page PDF, or one sheet from a large spreadsheet. That costs tokens, time and money.

On 23 November 2026, Google launched file slicing controls in the Gemini API: developers can specify exactly which part to process, and Google slices, renders and tokenizes it server-side.

What can be sliced?

  • Documents and slides (PDF, Office and OpenDocument formats): pick a page range, low/medium/high resolution, and a content layer (extracted page text or page images).
  • Spreadsheets (.xlsx, .xls, .ods): pick a worksheet tab and cell range, with data, formulas and visuals.
  • Audio and video: pick the time segments to process.

A file uploaded once through the Files API gets a reusable URI across turns and tool calls, with no need to re-upload. Slicing works across all Gemini 4 models, and the document and spreadsheet controls also support Gemini 3.

The practical benefit

Google says the API bills tokens only for the content Gemini actually inspects — for example, skimming a whole document as cheap extracted text to find the right section, then inspecting a single page at high resolution. The approach also removes the need to run LibreOffice, PDF renderers or ffmpeg inside the developer's own application.

Another notable point: the Gemini API now supports native uploads of Microsoft Office and OpenDocument files, with no prior conversion needed. Upload limits stay the same: 50 MB per file, 1,000 pages per PDF and 50,000 cells per spreadsheet sheet.

Source: Google, 23 November 2026.

SourceOriginal source