.xlsx)Finance and M&A teams can inspect Sheet 2 (A1:H50) of a multi-tab Excel workbook with evaluated values, raw cell formulas, and a high-resolution visual chart render in a single call—without paying to ingest 20 background data sheets.
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const workbook = await ai.files.upload({
file: "financial_model.xlsx",
config: { mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" },
});
const interaction = await ai.interactions.create({
model: "gemini-4-hydrogen",
input: [
{
type: "document",
uri: workbook.uri,
mime_type: workbook.mimeType,
resolution: "high",
processing: {
type: "static",
spreadsheet_options: {
sheet_index: 2,
visible_cells: "A1:H50",
content_layers: ["data", "formulas", "visual"],
},
},
},
{ type: "text", text: "Audit the EBITDA formulas and chart in Sheet 2 (A1:H50)." },
],
});
console.log(interaction.output_text);
function_result)Field engineering and legal review copilots can upload a 400-page PDF or .docx manual once via files.upload and let an inspection tool return only the exact requested page slice inside function_result:
from google import genai
client = genai.Client()
manual_file = client.files.upload(file="service_manual.pdf")
turn2 = client.interactions.create(
model="gemini-4-hydrogen",
previous_interaction_id=turn1.id,
tools=tools,
input=[
{
"type": "function_result",
"call_id": call.id,
"name": call.name,
"result": [
{
"type": "document",
"uri": manual_file.uri,
"mime_type": "application/pdf",
"resolution": "high",
"processing": {
"type": "static",
"page_options": {
"start_page": call.arguments["start_page"],
"end_page": call.arguments["end_page"],
"content_layers": ["page_image"],
},
},
}
],
}
],
)
Compliance and QA teams auditing 60-minute townhalls or support calls can pull content_layers: ["transcript"] first for text-token pricing, then pass start_offset: "1200s", end_offset: "1500s", and fps: 0.5 solely for the flagged 5-minute segment—or clip a 90-second audio segment ("60s" to "150s") with zero local ffmpeg preprocessing.
In @google/genai v3.5.0–v3.6.0, edge/browser apps combine ephemeral interactions.authTokens for direct WebSocket/WebRTC Live Interactions with defer_loading: true on remote MCPServer entries so only relevant enterprise tools enter active context when invoked.
Explore token savings, layer toggles, and copyable SDK snippets interactively in the Gemini Multimodal File Slicing & SDK v3.6 Studio [SIMULATED DEMO].