Skip to content
Neural Daily

ToolsNews

Gemini API file slicing: pay only for the pages you read

🇭🇺 Olvasd el magyarul →

The Gemini API now slices files server-side: from PDFs, Office files, spreadsheets, audio and video, the model loads only the pages, cell ranges or time segments you request. Google bills tokens only for the sliced part, and native Office and OpenDocument upload arrives too.

· 3 min read

Introducing file slicing controls in the Gemini API
Image: Google · Press kit · Source

What was released?

Google announced file slicing controls in the Gemini API, Google AI Studio and the Gemini platform on November 23 (Google). You upload a file once with the Files API, then reuse the same URI across turns and tool calls, requesting only the part you need each time. Google says the model receives only the slice, and tokens are billed only for it.

Native upload support for Microsoft Office and OpenDocument formats ships alongside. The feature works across all Gemini 4 models, and existing file size and page limits still apply to the uploaded file.

What can you slice?

  • Documents and slides (PDF, docx, pptx, odt and similar): page range (start_page, end_page), resolution (low, medium, high), and layers: extracted text (page_text) or rendered page images (page_image).
  • Spreadsheets (xlsx, xls, ods): worksheet (sheet_index) and cell range (visible_cells), with data, formulas and visual layers.
  • Video: time interval (start_offset, end_offset), fps and resolution, with transcript, frames or audio layers.
  • Audio: clip a time interval with start and end offsets.

Per the docs, a page costs about 560 tokens at medium resolution, about 280 at low and about 1,120 at high. The model automatically receives total page counts and worksheet names, so it can request follow-up ranges on its own (Gemini API docs). Without processing options, documents go in as page images and spreadsheets include values and formulas from all tabs.

Skim, then zoom

Google's recommended pattern: skim the whole document cheaply as extracted text to find the relevant section, then reuse the URI to request just that page as a high-resolution image. In the sample code, Gemini 4 Hydrogen does the skim and Gemini 4 Neon reads the detail. We covered both models: Gemini 4 Hydrogen: Argon-level smarts at $1.50 input and Gemini 4 Neon: 61 on the AA Index.

Why it matters

When an API only accepts whole files, agent harnesses end up running LibreOffice, PDF renderers and ffmpeg client-side. That eats memory and disk, and in enterprise setups it means per-user sandboxes. Slicing can also be specified inside a function_result, so the agent itself decides which part of a file to inspect. For long contracts, multi-tab workbooks or hour-long recordings, this can cut both token spend and client complexity.

    By Mikola Máté Patrik

    Produced with the help of AI, reviewed by an editor. How we make our articles

    Reviewed and edited by the Neural Daily desk. About

    Related articles