{"id":167796,"topic":"ai","source":"blog.google","title":"Introducing file slicing controls in the Gemini API - blog.google","url":"https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","url_hash":"b246a021e128cf62f4fc6c3faed89bf9409eaa49","author":"","summary":"<a href=\"https://news.google.com/rss/articles/CBMikgFBVV95cUxOYmRGbmJqX0VpT0hPa1NPLVUwNnV5VWw4el9SMDcyTXpPTkpWNlN0dnE3MnZJSFRxSThDSGNteFFmeFU0VVlwQ0dfY3U0aHJ6SUdXc0ZtSERheWVPY1h3NGNwTjlDNWp4am04MGs3TXlWMk41UVJqYzF1emYtQlR4cExnZjNJV1IxUkMyb05pYWFadw?oc=5\" target=\"_blank\">Introducing file slicing controls in the Gemini API</a>&nbsp;&nbsp;<font color=\"#6f6f6f\">blog.google</font>","content":"Introducing file slicing controls in the Gemini API\nToday, 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.\nInspect only what you need\nReal-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.\n- Upload once, slice across turns: Upload a file once with the Files API and reuse its URI across turns and tool calls.\n- Give your agent control: The API lets the agent specify what parts of a file to inspect directly inside a function response for faster and more efficient multi-turn workflows\n- Skim cheap, then zoom in: Skim first with extracted text, low-res previews, or transcripts, then spend high-resolution tokens only on the charts, dense layouts, and frames that matter.\nSlice documents, spreadsheets, and videos and more by range, layer, resolution, and frame rate to control token usage.\nMake your harness multimodal without local bloat\nWhen 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.\nHow it works\nNative 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:\n- 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).\n- 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).\n- Video: Clip time intervals (start_offset, end_offset), adjust fps and resolution (low, high), and choose content layers (transcript, frames, or audio).\n- Audio: clip time intervals (start_offset, end_offset) with ease.\nWhen 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.\nExample: Skim at a high level, zoom in on details\nUpload 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:\nfrom google import genai\nclient = genai.Client()\ndoc = client.files.upload(file=\"quarterly_report.docx\")\n# 1. Skim the whole document cheaply as extracted text.\nskim = client.interactions.create(\n    model=\"gemini-4-hydrogen\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\"content_layers\": [\"page_text\"]},\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Which page has the revenue bridge chart?\",\n        },\n    ],\n)\nprint(skim.output_text)\n# 2. Zoom into the target page at high resolution (reusing the same URI).\ndetail = client.interactions.create(\n    model=\"gemini-4-neon\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"resolution\": \"high\",\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\n                    \"start_page\": 3,\n                    \"end_page\": 3,\n                    \"content_layers\": [\"page_image\"],\n                },\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Read the revenue bridge chart and footnotes on page 3.\",\n        },\n    ],\n)\nprint(detail.output_text)Early adoption across agent frameworks\nGateway and SDK partners validated these controls ahead of launch, cutting prompt token spend directly in production harnesses:","image_url":"https://storage.googleapis.com/gweb-uniblog-publish-prod/images/Introducing-File-Slicing-Controls-2784x1566.width-1300.png","lang":"en","published_at":"2026-11-23T18:12:30+00:00","fetched_at":"2026-11-24T18:15:13+00:00","status":"read","starred":0,"extract_state":"ok","summary_auto":"Introducing file slicing controls in the Gemini API\nToday, 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.","cluster_id":null,"extract_retries":0,"extract_error":null,"item_type":"news","ref_id":null,"refs_json":null,"doi":null,"arxiv_id":null,"paper_version":null,"sources_json":null,"relevance_score":null,"relevance_method":null,"cited_by":null,"contract_version":"news_item.v1","format_contract_version":"news_item_formats.v1","dedup_url":"https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 4772 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":4772,"summary_length":434,"usable_text_length":4772,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":4772,"summary_length":434}},"news_item":{"id":167796,"canonical_url":"https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","source_url":"https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","title":"Introducing file slicing controls in the Gemini API - blog.google","source_name":"blog.google","author":null,"published_at":"2026-11-23T18:12:30+00:00","locale":"en","topic":"ai","tags":[],"rss_summary":"<a href=\"https://news.google.com/rss/articles/CBMikgFBVV95cUxOYmRGbmJqX0VpT0hPa1NPLVUwNnV5VWw4el9SMDcyTXpPTkpWNlN0dnE3MnZJSFRxSThDSGNteFFmeFU0VVlwQ0dfY3U0aHJ6SUdXc0ZtSERheWVPY1h3NGNwTjlDNWp4am04MGs3TXlWMk41UVJqYzF1emYtQlR4cExnZjNJV1IxUkMyb05pYWFadw?oc=5\" target=\"_blank\">Introducing file slicing controls in the Gemini API</a>&nbsp;&nbsp;<font color=\"#6f6f6f\">blog.google</font>","full_text":"Introducing file slicing controls in the Gemini API\nToday, 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.\nInspect only what you need\nReal-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.\n- Upload once, slice across turns: Upload a file once with the Files API and reuse its URI across turns and tool calls.\n- Give your agent control: The API lets the agent specify what parts of a file to inspect directly inside a function response for faster and more efficient multi-turn workflows\n- Skim cheap, then zoom in: Skim first with extracted text, low-res previews, or transcripts, then spend high-resolution tokens only on the charts, dense layouts, and frames that matter.\nSlice documents, spreadsheets, and videos and more by range, layer, resolution, and frame rate to control token usage.\nMake your harness multimodal without local bloat\nWhen 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.\nHow it works\nNative 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:\n- 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).\n- 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).\n- Video: Clip time intervals (start_offset, end_offset), adjust fps and resolution (low, high), and choose content layers (transcript, frames, or audio).\n- Audio: clip time intervals (start_offset, end_offset) with ease.\nWhen 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.\nExample: Skim at a high level, zoom in on details\nUpload 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:\nfrom google import genai\nclient = genai.Client()\ndoc = client.files.upload(file=\"quarterly_report.docx\")\n# 1. Skim the whole document cheaply as extracted text.\nskim = client.interactions.create(\n    model=\"gemini-4-hydrogen\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\"content_layers\": [\"page_text\"]},\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Which page has the revenue bridge chart?\",\n        },\n    ],\n)\nprint(skim.output_text)\n# 2. Zoom into the target page at high resolution (reusing the same URI).\ndetail = client.interactions.create(\n    model=\"gemini-4-neon\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"resolution\": \"high\",\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\n                    \"start_page\": 3,\n                    \"end_page\": 3,\n                    \"content_layers\": [\"page_image\"],\n                },\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Read the revenue bridge chart and footnotes on page 3.\",\n        },\n    ],\n)\nprint(detail.output_text)Early adoption across agent frameworks\nGateway and SDK partners validated these controls ahead of launch, cutting prompt token spend directly in production harnesses:","excerpt":"Introducing file slicing controls in the Gemini API\nToday, 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.","extraction":{"state":"ok","confidence":0.9,"error":null,"explanation":"High confidence: full text extraction produced 4772 characters.","diagnostics_url":"/api/diagnose?url=https%3A//blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 4772 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":4772,"summary_length":434,"usable_text_length":4772,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":4772,"summary_length":434}}},"display_formats":["compact","card","full","digest_section","json"]},"daily_stack_record":{"title":"Introducing file slicing controls in the Gemini API - blog.google","url":"https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","summary":"Introducing file slicing controls in the Gemini API\nToday, 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.","source":"blog.google","date":"2026-11-23T18:12:30+00:00","content":"Introducing file slicing controls in the Gemini API\nToday, 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.\nInspect only what you need\nReal-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.\n- Upload once, slice across turns: Upload a file once with the Files API and reuse its URI across turns and tool calls.\n- Give your agent control: The API lets the agent specify what parts of a file to inspect directly inside a function response for faster and more efficient multi-turn workflows\n- Skim cheap, then zoom in: Skim first with extracted text, low-res previews, or transcripts, then spend high-resolution tokens only on the charts, dense layouts, and frames that matter.\nSlice documents, spreadsheets, and videos and more by range, layer, resolution, and frame rate to control token usage.\nMake your harness multimodal without local bloat\nWhen 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.\nHow it works\nNative 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:\n- 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).\n- 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).\n- Video: Clip time intervals (start_offset, end_offset), adjust fps and resolution (low, high), and choose content layers (transcript, frames, or audio).\n- Audio: clip time intervals (start_offset, end_offset) with ease.\nWhen 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.\nExample: Skim at a high level, zoom in on details\nUpload 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:\nfrom google import genai\nclient = genai.Client()\ndoc = client.files.upload(file=\"quarterly_report.docx\")\n# 1. Skim the whole document cheaply as extracted text.\nskim = client.interactions.create(\n    model=\"gemini-4-hydrogen\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\"content_layers\": [\"page_text\"]},\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Which page has the revenue bridge chart?\",\n        },\n    ],\n)\nprint(skim.output_text)\n# 2. Zoom into the target page at high resolution (reusing the same URI).\ndetail = client.interactions.create(\n    model=\"gemini-4-neon\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"resolution\": \"high\",\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\n                    \"start_page\": 3,\n                    \"end_page\": 3,\n                    \"content_layers\": [\"page_image\"],\n                },\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Read the revenue bridge chart and footnotes on page 3.\",\n        },\n    ],\n)\nprint(detail.output_text)Early adoption across agent frameworks\nGateway and SDK partners validated these controls ahead of launch, cutting prompt token spend directly in production harnesses:","confidence":0.9,"diagnostics_url":"/api/diagnose?url=https%3A//blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","quality_bucket":"high","failure_kind":"none","retryable":false,"quality_reason":"High confidence: full text extraction produced 4772 characters.","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 4772 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":4772,"summary_length":434,"usable_text_length":4772,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":4772,"summary_length":434}},"tags":[]},"fallback_formats":["markdown","json","html"],"actions":{"read":"/item/167796","export_markdown":"/api/items/167796/export?format=markdown","export_json":"/api/items/167796/export?format=json","diagnose":"/api/diagnose?url=https%3A//blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/"},"formats":{"full":{"id":167796,"title":"Introducing file slicing controls in the Gemini API - blog.google","url":"https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","source":"blog.google","author":null,"published_at":"2026-11-23T18:12:30+00:00","locale":"en","topic":"ai","tags":[],"excerpt":"Introducing file slicing controls in the Gemini API\nToday, 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.","full_text":"Introducing file slicing controls in the Gemini API\nToday, 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.\nInspect only what you need\nReal-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.\n- Upload once, slice across turns: Upload a file once with the Files API and reuse its URI across turns and tool calls.\n- Give your agent control: The API lets the agent specify what parts of a file to inspect directly inside a function response for faster and more efficient multi-turn workflows\n- Skim cheap, then zoom in: Skim first with extracted text, low-res previews, or transcripts, then spend high-resolution tokens only on the charts, dense layouts, and frames that matter.\nSlice documents, spreadsheets, and videos and more by range, layer, resolution, and frame rate to control token usage.\nMake your harness multimodal without local bloat\nWhen 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.\nHow it works\nNative 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:\n- 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).\n- 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).\n- Video: Clip time intervals (start_offset, end_offset), adjust fps and resolution (low, high), and choose content layers (transcript, frames, or audio).\n- Audio: clip time intervals (start_offset, end_offset) with ease.\nWhen 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.\nExample: Skim at a high level, zoom in on details\nUpload 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:\nfrom google import genai\nclient = genai.Client()\ndoc = client.files.upload(file=\"quarterly_report.docx\")\n# 1. Skim the whole document cheaply as extracted text.\nskim = client.interactions.create(\n    model=\"gemini-4-hydrogen\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\"content_layers\": [\"page_text\"]},\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Which page has the revenue bridge chart?\",\n        },\n    ],\n)\nprint(skim.output_text)\n# 2. Zoom into the target page at high resolution (reusing the same URI).\ndetail = client.interactions.create(\n    model=\"gemini-4-neon\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"resolution\": \"high\",\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\n                    \"start_page\": 3,\n                    \"end_page\": 3,\n                    \"content_layers\": [\"page_image\"],\n                },\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Read the revenue bridge chart and footnotes on page 3.\",\n        },\n    ],\n)\nprint(detail.output_text)Early adoption across agent frameworks\nGateway and SDK partners validated these controls ahead of launch, cutting prompt token spend directly in production harnesses:","reading_time_min":3,"extraction":{"state":"ok","confidence":0.9,"error":null,"explanation":"High confidence: full text extraction produced 4772 characters.","diagnostics_url":"/api/diagnose?url=https%3A//blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 4772 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":4772,"summary_length":434,"usable_text_length":4772,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":4772,"summary_length":434}}},"quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 4772 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":4772,"summary_length":434,"usable_text_length":4772,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":4772,"summary_length":434}},"actions":{"read":"/item/167796","export_markdown":"/api/items/167796/export?format=markdown","export_json":"/api/items/167796/export?format=json","diagnose":"/api/diagnose?url=https%3A//blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/"}},"digest":{"id":167796,"title":"Introducing file slicing controls in the Gemini API - blog.google","url":"https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","source":"blog.google","topic":"ai","published_at":"2026-11-23T18:12:30+00:00","excerpt":"Introducing file slicing controls in the Gemini API 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…","quality_bucket":"high","quality_reason":"High confidence: full text extraction produced 4772 characters.","reading_time_min":3,"cluster_id":null},"card":{"display_title":"Introducing file slicing controls in the Gemini API - blog.google","subtitle":"blog.google · 2026-11-23","summary":"Introducing file slicing controls in the Gemini API 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…","badges":["quality:high"],"links":{"read":"/item/167796","original":"https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","diagnose":"/api/diagnose?url=https%3A//blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/"},"quality_warning":null},"export":{"title":"Introducing file slicing controls in the Gemini API - blog.google","url":"https://blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","summary":"Introducing file slicing controls in the Gemini API\nToday, 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.","source":"blog.google","date":"2026-11-23T18:12:30+00:00","content":"Introducing file slicing controls in the Gemini API\nToday, 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.\nInspect only what you need\nReal-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.\n- Upload once, slice across turns: Upload a file once with the Files API and reuse its URI across turns and tool calls.\n- Give your agent control: The API lets the agent specify what parts of a file to inspect directly inside a function response for faster and more efficient multi-turn workflows\n- Skim cheap, then zoom in: Skim first with extracted text, low-res previews, or transcripts, then spend high-resolution tokens only on the charts, dense layouts, and frames that matter.\nSlice documents, spreadsheets, and videos and more by range, layer, resolution, and frame rate to control token usage.\nMake your harness multimodal without local bloat\nWhen 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.\nHow it works\nNative 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:\n- 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).\n- 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).\n- Video: Clip time intervals (start_offset, end_offset), adjust fps and resolution (low, high), and choose content layers (transcript, frames, or audio).\n- Audio: clip time intervals (start_offset, end_offset) with ease.\nWhen 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.\nExample: Skim at a high level, zoom in on details\nUpload 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:\nfrom google import genai\nclient = genai.Client()\ndoc = client.files.upload(file=\"quarterly_report.docx\")\n# 1. Skim the whole document cheaply as extracted text.\nskim = client.interactions.create(\n    model=\"gemini-4-hydrogen\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\"content_layers\": [\"page_text\"]},\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Which page has the revenue bridge chart?\",\n        },\n    ],\n)\nprint(skim.output_text)\n# 2. Zoom into the target page at high resolution (reusing the same URI).\ndetail = client.interactions.create(\n    model=\"gemini-4-neon\",\n    input=[\n        {\n            \"type\": \"document\",\n            \"uri\": doc.uri,\n            \"mime_type\": doc.mime_type,\n            \"resolution\": \"high\",\n            \"processing\": {\n                \"type\": \"static\",\n                \"page_options\": {\n                    \"start_page\": 3,\n                    \"end_page\": 3,\n                    \"content_layers\": [\"page_image\"],\n                },\n            },\n        },\n        {\n            \"type\": \"text\",\n            \"text\": \"Read the revenue bridge chart and footnotes on page 3.\",\n        },\n    ],\n)\nprint(detail.output_text)Early adoption across agent frameworks\nGateway and SDK partners validated these controls ahead of launch, cutting prompt token spend directly in production harnesses:","confidence":0.9,"diagnostics_url":"/api/diagnose?url=https%3A//blog.google/innovation-and-ai/technology/developers-tools/file-slicing-controls/","quality_bucket":"high","failure_kind":"none","retryable":false,"quality_reason":"High confidence: full text extraction produced 4772 characters.","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 4772 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":4772,"summary_length":434,"usable_text_length":4772,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":4772,"summary_length":434}},"tags":[],"format_contract_version":"news_item_formats.v1"}}}