Gemini API erhält neue File-Slicing-Steuerungen
Google ergänzt die Gemini API um File-Slicing-Steuerungen und native Unterstützung für Office-Dateien. KI-Agenten können damit gezielt Dateiausschnitte in Google AI Studio und Vertex AI analysieren und zahlen nur für tatsächlich genutzte Teile.

The Gemini API now features native file slicing controls, allowing developers to specify targeted pages, sheet ranges, and media segments for the model to load server-side. This capability reduces token costs for large files.
Today, we're launching new file slicing controls in the API across Google AI Studio and Gemini platform, alongside native file upload support for Microsoft Office and OpenDocument formats. You can now pass PDFs, Office files (docs, slides, spreadsheets), audio, and video directly to the Gemini API and request only the pages, spreadsheet cells, media segments, and layers you need. This keeps context focused on the relevant parts of a file while billing tokens only for the parts Gemini inspects.
Real-world knowledge work lives in dense PDFs, slide decks, multi-tab workbooks, and long recordings. With server-side slicing, you do not have to flatten files to plain text or ingest entire files up front.
Slice documents, spreadsheets, and videos and more by range, layer, resolution, and frame rate to control token usage.
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.
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:
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.
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:
from google import genai client = genai.Client() doc = client.files.upload(file="quarterly_report.docx") # 1. Skim the whole document cheaply as extracted text. skim = client.interactions.create( model="gemini-4-hydrogen", input=[ { "type": "document", "uri": doc.uri, "mime_type": doc.mime_type, "processing": { "type": "static", "page_options": {"content_layers": ["page_text"]}, }, }, { "type": "text", "text": "Which page has the revenue bridge chart?", }, ], ) print(skim.output_text) # 2. Zoom into the target page at high resolution (reusing the same URI). detail = client.interactions.create( model="gemini-4-neon", input=[ { "type": "document", "uri": doc.uri, "mime_type": doc.mime_type, "resolution": "high", "processing": { "type": "static", "page_options": { "start_page": 3, "end_page": 3, "content_layers": ["page_image"], }, }, }, { "type": "text", "text": "Read the revenue bridge chart and footnotes on page 3.", }, ], ) print(detail.output_text) Early adoption across agent frameworks Gateway and SDK partners validated these controls ahead of launch, cutting prompt token spend directly in production harnesses:
Native file slicing, content-layer controls, and expanded files support are available today via the API in Google AI Studio and the Gemini platform. Check out our docs to start building.