gemini 4 neonwebpage to markdownclean sourcescontext windowweb2md

Gemini API File Slicing and Web Pages

Zephyr Whimsy2026-11-249 min read

Gemini API file slicing uploads a PDF, Office or OpenDocument file, spreadsheet, audio file, or video once, then requests specific pages, cell ranges, time segments, or content layers. Google bills the slice sent to the model. It does not slice a live web page. The document docs say TXT, Markdown, HTML, and XML are extracted as plain text only.

Facts below were checked on 24 November 2026 (verified 2026-11-24). This post adds no Web2MD token-saving percentage. See how to reduce LLM token cost and Markdown versus HTML for LLMs.

Short answer

Use Gemini file slicing for a PDF, deck, spreadsheet, or recording you upload. For a live web page, convert that URL to clean Markdown and send the text. Slicing does not select a section of a webpage.

What is Gemini API file slicing?

Google's post Introducing file slicing controls in the Gemini API is dated 23 November 2026. It says the controls ship in the API across Google AI Studio and the Gemini platform, beside native uploads for Microsoft Office and OpenDocument files. You pass PDFs, Office files, spreadsheets, audio, and video, and you request only the pages, cells, media segments, and layers you need. Tokens are billed for the parts Gemini inspects.

The changelog, read the same day, does not put that bullet on 23 November. It sits under 18 November 2026, next to Gemini 4 Neon becoming generally available. The wording matches: slice documents, spreadsheets, videos, and audio in prompts and function responses, by page range, worksheet, cell range, time interval, or content layer. Use the blog post as the 23 November walkthrough, and the changelog as the note currently grouped on 18 November. Both pages were open on 24 November 2026.

The announcement says native file slicing works across Gemini 4 models, and that existing file size and page limits still apply to the whole upload. The document understanding page says the document, presentation, and spreadsheet options work on Gemini 3 and on Gemini 4 and later, in user input and in a function result. Both sentences are official. They are not the same scope. Recheck both if you are still on a Gemini 3 model.

Storage is not the token bill. The document page says the Files API costs nothing in regions where the Gemini API is available, and that uploads are kept for 48 hours. Later turns reuse the file URI.

Which files can you slice, and what is the token cost?

Slicing is a processing object on a file you already passed. Leaving it off is not a free skim. The announcement says that, with no processing options, documents and slides default to layout-preserving page images, and spreadsheets include evaluated values, formulas, and sheet names on every tab. The document page says that once you set those options, Gemini counts and bills only the selected pages, sheets, and content layers.

Limits apply to the full file even if you then view five pages. Verified 2026-11-24: 50 MB per file, 1,000 pages per PDF, 2,000 pages or slides per Office or OpenDocument file, and 50,000 cells per sheet.

| Input | What you select | Official token note | | --- | --- | --- | | PDF, Word, PowerPoint, OpenDocument | Pages start_page–end_page, resolution low / medium / high, layers page_text and/or page_image | Gemini 3 and 4 images: about 280 / 560 / 1,120 tokens a page. Medium is the default. Gemini 2.5 is 258 a page. | | .xlsx, .xls, .ods | sheet_index, A1 visible_cells, layers data, formulas, visual | No sheet index means every sheet, up to 50,000 cells each. | | Uploaded video | Offsets such as 1200s, fps in (0, 24], layers frames, audio, transcript | Static mode bills the clip and the layers. At 1 fps: about 66 tokens a frame at low, else 258, plus 32 audio tokens a second. | | Uploaded audio | start_offset and end_offset only | 32 tokens a second (1,920 a minute), billed for the clip. Cap listed: 9.5 hours. |

After processing is on, a document's layer defaults to page images, not extracted text, and static video defaults to frames plus audio. Skim with page_text or a video transcript, then request one high-resolution page or a short frame window on the same URI. Five page images at the documented high rate of about 1,120 tokens a page are on the order of 5,600 image tokens before the prompt. That is the published rate times a page count, not a measured bill.

The video understanding page also describes agentic mode, where listed Gemini 4 and some Gemini 3 models walk the timeline themselves. It says this typically uses up to 88% fewer total tokens than static processing on long-form video (verified 2026-11-24). That 88% is Google's video comparison, not a webpage result and not a Web2MD number. A public YouTube URL is a separate preview input on that page, at no charge for now, with pricing likely to change. The free tier cannot upload more than 8 hours of YouTube video a day. The slicing samples use a Files API upload. This article does not treat a YouTube URL as a PDF-style slice.

Why doesn't file slicing cover a live web page?

The controls name pages, sheets, and timestamps inside a file. A web page is not that file.

TXT, Markdown, HTML, and XML are extracted as plain text only. Layout, formatting, and charts are not kept. Saving a page as HTML and uploading it does not create page images for a range such as 3–7. The menu stays if it was in the file, and there is no page range. A live URL can also depend on a cookie, a script, or a section you expanded. The Files API does not hold that browser session. None of the three Google pages says a URL plus a CSS selector is a slice.

The per-page and per-second rates start after a document or a recording is already in the API. Pasting a raw page bills normal input tokens for the whole paste, chrome included. This post invents no multiplier for that. Feeding one page to Gemini 4 Neon covers Neon's own web research versus a source you pin.

How do you combine a sliced file with a web page?

One source, one path. A report and a docs URL are not the same object, and they should not share one upload.

  1. Open the URL and wait for the paragraph you need. Put the URL and the capture date on the first lines. Public pages can use the webpage converter or the free tier: three public URLs a day on Web2MD's server (llms.txt). Send the Markdown as text in the Gemini app, AI Studio, or the API. Do not upload the .md and expect start_page to work.
  2. A page that exists only in a browser you already signed into goes through Agent Bridge. It returns Markdown from that Chrome session. It does not log in, clear a CAPTCHA, or add a permission. Send to AI can pass the Markdown to Gemini, Claude, ChatGPT, Perplexity, Grok, or DeepSeek. You still pick the model. It does not set slicing options.
  3. Upload the PDF or deck once with the Files API. Skim with extracted text, then request page_image at high resolution for the chart pages. You cannot ask for "pages 3–7" of the HTML docs. Convert that URL and keep the section you will quote.
  4. A real workbook (.xlsx, .xls, .ods) gets sheet_index and visible_cells. A table copied from a webpage is not that file.
  5. On YouTube, the extension reads captions, not the video. Install it from the Chrome Web Store, open the video, and convert on that tab (Ctrl+M on Mac, Alt+M on Windows, or the icon). Captions must already exist, including the auto-generated track. Web2MD does not transcribe audio, and the server fetch does not pull timed text. See YouTube to Markdown. If you hold the recording and need frames, upload it and set a time range plus transcript or frames.

Pricing lists a free tier of 3 conversions a day, Pro Monthly at $9, a 30-day pass at $15, Pro Yearly at $49.99, and Lifetime at $149. Conversion inside the signed-in browser is a Pro path. The free tier is the server path for public pages.

What does Web2MD change for a URL, and what does it leave alone?

Web2MD is a Chrome and Firefox extension and a web service that turns a webpage into Markdown, keeping headings, lists, tables, and code, and dropping navigation when the extractor can see the article. Firefox is on addons.mozilla.org. Edge is in development. Safari is planned, not available. Pro adds POST /api/v1/convert, hosted MCP at https://web2md.org/api/mcp, and Agent Bridge for a page already open in Chrome.

The homepage's own line is about 65% fewer tokens than raw HTML, and 1,000+ installs. Those are the site's figures. The public benchmark measures characters and structure on two public pages and does not report a token percentage. Do not read that 65% as a file-slicing result.

A PDF already open in the browser is a different tool, on PDF to Markdown. It needs a text layer, so a scan made of images is not extracted. The extension workflow is Pro and sends the file over HTTPS. It does not set Gemini resolution. Use slicing for a chart image, and this converter for the words.

Web2MD does not upload your deck to the Gemini Files API, does not choose start_page, and does not bypass a login. If you cannot see the page, the extension cannot either.

Which of these lines should you recheck?

Upload limits, the default layer, and the YouTube preview price are the lines most likely to move. Before a large run, reread the 23 November announcement, the changelog, and the document, video, and audio pages. The sentences here match those pages on 24 November 2026. A URL is still not a slice, uploaded HTML is still plain text, and the 88% figure is still only Google's long-video comparison.

Related Articles

Most Read

last 30 days
  1. #1Can Claude Read Reddit? No — Here's the One-Click Fix (2026)
  2. #2HTML vs Markdown for LLMs: I Wasted 67% of My Tokens for a Year
  3. #3Reducing Token Waste in ChatGPT and Claude: 7 Techniques That Cut Costs 72%
  4. #4Obsidian Web Clipper Official Plugin 2026: Complete Guide + When You Need More
  5. #5Reddit JSON API vs Scraping: The Honest 2026 Comparison for Developers

Latest Articles