Make your harness multimodal with out native bloat
When mannequin APIs solely ingest entire recordsdata, brokers find yourself working LibreOffice, PDF renderers, and ffmpeg contained in the consumer harness to render and slice massive recordsdata. This bloats reminiscence, clutters native disk with extracted frames, and forces enterprise platforms to take care of per-user sandboxes simply to slice recordsdata. With the Gemini API, cross a Information API URI on a person flip or instantly inside a function response (function_result), and the API natively slices, renders, and tokenizes every file server-side the best way the mannequin was educated to see it.
The way it works
Native file slicing works throughout all Gemini 4 fashions, and current file dimension and web page limits nonetheless apply to the uploaded file. You possibly can customise processing throughout these media classes:
- Documents and slides (PDF, Office and OpenDocument formats): Choose a web page vary (start_page, end_page), set decision (low, medium, or excessive), and select content material layers (page_text or page_image).
- Spreadsheets (.xlsx, .xls, .ods): Choose a worksheet tab (sheet_index) and cell vary (visible_cells), set decision (low, medium, or excessive), and choose content material layers (knowledge, formulation, and visuals).
- Video: Clip time intervals (start_offset, end_offset), modify fps and backbone (low, excessive), and select content material layers (transcript, frames, or audio).
- Audio: clip time intervals (start_offset, end_offset) with ease.
When processing choices are omitted from API calls, paperwork and slides default to layout-preserving web page photos, and spreadsheets embody evaluated values, formulation, and sheet names throughout all tabs.
Instance: Skim at a excessive degree, zoom in on particulars
Add a Phrase doc as soon as to the Information API, skim each web page cheaply as extracted textual content to find the correct part, then reuse the identical URI to examine a single web page at excessive decision:
