Introducing file slicing controls in the Gemini API


Make your harness multimodal without local bloat

When model APIs only ingest whole files, agents end up running LibreOffice, PDF renderers, and ffmpeg inside the client harness to render and slice large files. This bloats memory, clutters local disk with extracted frames, and forces enterprise platforms to maintain per-user sandboxes just to slice files. With the Gemini API, pass a Files API URI on a user turn or directly inside a function response (function_result), and the API natively slices, renders, and tokenizes each file server-side the way the model was trained to see it.

How it works

Native file slicing works across all Gemini 4 models, and existing file size and page limits still apply to the uploaded file. You can customize processing across these media categories:

  • Documents and slides (PDF, Office and OpenDocument formats): Select a page range (start_page, end_page), set resolution (low, medium, or high), and choose content layers (page_text or page_image).
  • Spreadsheets (.xlsx, .xls, .ods): Select a worksheet tab (sheet_index) and cell range (visible_cells), set resolution (low, medium, or high), and select content layers (data, formulas, and visuals).
  • Video: Clip time intervals (start_offset, end_offset), adjust fps and resolution (low, high), and choose content layers (transcript, frames, or audio).
  • Audio: clip time intervals (start_offset, end_offset) with ease.

When processing options are omitted from API calls, documents and slides default to layout-preserving page images, and spreadsheets include evaluated values, formulas, and sheet names across all tabs.

Example: Skim at a high level, zoom in on details

Upload a Word document once to the Files API, skim every page cheaply as extracted text to locate the right section, then reuse the same URI to inspect a single page at high resolution:



Source link

Share:

Atbildēt

3 latest news
News Archives
On Key

Related Posts

Adtelligent Product Updates Q1 2026

At Adtelligent, we continuously improve our products to make everyday work easier, faster, and more efficient for our partners. In Q1 2026 we shipped updates

5 Adtech Trends From DMEXCO 2026

DMEXCO returned to Cologne on September 23-24 under the official theme “Scaling Intelligence.” The message behind the theme was straightforward: AI has moved beyond experimentation,