SalpXXAPI News
AI News 4 min read

Gemini API file slicing is live: verify the file and billing path before gateway integration

Google has added server-side file slicing and native Office/OpenDocument uploads to the Gemini API. This can keep irrelevant content out of context, but clients, gateways, and upstream routes must be checked independently.

The conclusion first

On November 23, 2026, Google DeepMind announced server-side file-slicing controls for the Gemini API, along with native uploads for Microsoft Office and OpenDocument files. Developers can specify PDF pages, spreadsheet sheets and cell ranges, and audio or video segments. The API processes only the requested portions and bills for the content the model actually inspects. The feature is available through the API in Google AI Studio and the Gemini platform, and works across Gemini 4 models.1

For Gemini API users, this has two practical benefits: large-file tasks can exclude irrelevant material from context and potentially reduce spend. But support in Google's API does not mean every compatible client, gateway, or upstream route already forwards the required fields. Before migrating, verify the request schema, upload path, and usage records, then expand traffic gradually.

What changed

Previously, an application often converted a PDF, spreadsheet, or long recording into text or video frames before sending a large payload to a model. That can add client-side dependencies and bring irrelevant pages or columns into the prompt. Google's implementation lets an application upload a file through the Files API, reuse its URI in later turns, and specify which portions the model should process.

The available controls include:

  • Documents and slides: choose page ranges, resolution, and text or page-image layers.
  • Spreadsheets: choose a worksheet, visible cell range, resolution, and data, formula, or visual layers.
  • Video: choose time intervals, frame rate, resolution, and transcript, frame, or audio layers.
  • Audio: choose the time interval to process.

For example, a finance agent can search extracted text to locate a relevant page, then inspect its chart and footnotes at higher resolution. This “skim first, zoom in later” workflow can make input scope easier to control than rendering the entire file on every turn. Google says an uploaded file URI can be reused across turns and tool calls. If processing options are omitted, documents and slides default to layout-preserving page images, while spreadsheets include evaluated values, formulas, and sheet names across all tabs.1

What API and gateway users should consider

First, a model name does not prove that a feature is available. File uploads and slicing are parts of the request protocol and file lifecycle. A gateway that only supports ordinary text chat may not handle Files API URIs, file references inside function_result, or media-processing options. If the request succeeds while fields are ignored, an application may silently fall back to processing the entire file.

Second, token cost depends on what the model actually reads, not what the developer intended to ask about. Default processing may include more than expected, so pass ranges explicitly and check usage, response behavior, and provider billing during testing. For spreadsheets, verify whether the selected range includes formulas and visual content.

Third, upload and generation are separate request stages. File URIs have lifecycle and access boundaries. Do not leak them into logs, client-side error pages, or third-party analytics. Reuse across turns also calls for clear ownership, deletion, and expiration policies.

A safer integration sequence

  1. Confirm that the upstream account, model, and API version support uploads and slicing. Do not infer support from a model catalog or announcement alone.
  1. Test small, non-sensitive PDF, spreadsheet, audio, and video samples for upload, range selection, reuse across turns, and file references returned through tools.
  1. Compare sliced and unsliced requests for input tokens, latency, cost, and answer quality. Do not assume slicing is always cheaper; a range that is too narrow can omit a critical note.
  1. When routing through a gateway, confirm that the fields remain unchanged in both gateway logs and the upstream request. Correlate with request IDs and never log real keys or sensitive file contents.
  1. Keep slicing rules configurable and add integrity checks for important documents. For finance, contracts, or health materials, sample-check the pages and ranges the model actually received.

A minimal check for SalpX users

SalpX's documentation publishes the Base URL https://www.salpx.com/v1, Bearer-key authentication, and GET /v1/models for checking models available to the current token.2 These verify basic API access and model visibility, but do not establish support for file slicing. Start with a small, non-sensitive sample. Confirm the upload, verify the selected slice was processed, reconcile usage, and only then add the feature to a production workflow.

If a current client supports only text or image URLs, do not force Gemini-native fields into an incompatible request. You can temporarily slice files on the client side or continue the existing workflow while asking the gateway provider about protocol support. Keep the previous route available for rollback so file-processing errors do not block the whole workflow.

Remember

File slicing is not merely “sending less.” It turns file understanding from one large input into controlled, on-demand retrieval. Developers should verify protocol pass-through, the actual content inspected, and billing together. The official capability is available, but each deployment path still needs its own checks. Test and reconcile on a small sample before increasing traffic.

Sources & attribution

This article references the public materials listed below. Analysis and wording are SalpX's own; quoted material remains the property of its original authors and publishers.

  1. Introducing file slicing controls in the Gemini API — Google DeepMind · accessed 2026-11-27Note:Google DeepMind's official November 23, 2026 article confirming server-side file slicing, native Office/OpenDocument uploads, and billing for the content actually inspected.
  2. SalpX API Reference — SalpX · accessed 2026-11-27Note:SalpX's official documentation publishes the Base URL and model-list endpoint used in the gateway verification steps.

One key for Claude, GPT and 50+ models

The SalpX gateway is OpenAI-SDK compatible. Point base_url at https://www.salpx.com/v1 and you are done.