Gemini API lets you slice documents, spreadsheets, video and audio, and bills only the slice (November 18, 2026)
Gemini can now read just the pages, sheet, cell range or time clip you pick, and bills only that slice. ODS now gives all sheets.
Your keys
0 of 1 ready
Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. Your keys stay in this tab. They are never sent to Wirestack or saved; we only count that the panel was used.
- Google Gemini API API keyGEMINI_API_KEYGet key
Click Create API key
What changed
On November 18, 2026 Google added slicing to the Gemini API. You add a processing object ({"type": "static", ...}) to a document, video or audio block, and the model only gets the part you pick. The changelog says this lets you "only process and pay for the content you need". The document guide says Gemini "counts and bills tokens only for the sliced output sent to the model". It works in user input and inside function_result.result, so a tool can hand back just pages 14 to 16 of a manual.
Documents and slides (.pdf, .docx, .doc, .dotx, .odt, .pptx, .ppt, .odp): set processing.page_options.
start_page: 1-indexed, inclusive.<= 0returns400 INVALID_ARGUMENT. Past the page count you get an empty slice.end_page: 1-indexed, inclusive, clamps to the last page. Must be>= start_page.content_layers:"page_image","page_text"or both. Defaults to["page_image"]onceprocessingis set.resolutiongoes on the outerdocumentblock:"low"(~280 tokens per page),"medium"(default, ~560) or"high"(~1,120).
Spreadsheets (.xlsx, .xls, .ods): set processing.spreadsheet_options.
sheet_index: 1-indexed tab position. Leave it out to get all sheets (up to 50,000 cells per sheet).<= 0or above the sheet count returns400 INVALID_ARGUMENT.visible_cells: an A1 range such as"A1:G40"or"B5". Crops every selected layer.content_layers:"data"(evaluated values), , (rendered snapshot for charts). Defaults to .
