AI & Agents

Gemini Max File Size: Limits for Web, Advanced, and API Uploads

The Google Gemini max file size restricts web interface users to 100MB per document and 2GB for video files, with a 10-file cap per prompt. Developers using the Gemini Files API can stage files up to 2GB with a 20GB project storage quota, while inline API requests accept payloads up to 100MB (50MB for PDFs). Processing multi-gigabyte document archives requires persistent workspace indexing rather than repeated file attachments.

Derek Labian 20 min read Updated
Managing large file collections across Gemini web limits, developer API quotas, and persistent cloud workspaces.

What is the Gemini max file size across web and API uploads?

The Google Gemini max file size is 100 MB per document and 2 GB per video in the web interface, while the Gemini Files API allows up to 2 GB per file across all supported formats, as documented in Google's official Gemini Apps support specifications on October 17, 2026. This dual boundary creates distinct operating rules depending on whether you interact with the consumer web application, run Gemini Advanced, or build programmatic applications through Google AI Studio and Vertex AI.

Gemini max file size is the documented individual file size ceiling, typically 100 MB per document in the Gemini web interface and up to 2 GB via the Gemini Files API or 100 MB for inline base64 payloads, that can be uploaded in a single turn. A file over the threshold is rejected at upload, before the model processes any text.

Google structures upload boundaries across five distinct environments:

  • Gemini Web Free: Accepts up to 10 files in a single prompt. Documents, spreadsheets, plain text, and code archives are capped at 100 MB per file. Video files can reach up to 2 GB with a maximum duration of 5 minutes. Audio recordings are capped at 10 minutes.
  • Gemini Advanced (Google AI Pro and Google AI Ultra): Maintains the same 10-file attachment limit and 100 MB document size ceiling as the standard free web interface. The paid tier expands media duration, allowing up to 1 hour of video analysis and up to 3 hours of audio processing.
  • Google Workspace Accounts: Follows standard web file size limits, but document access depends on administrator configuration. Accessing files from Google Drive requires the Workspace domain administrator to enable Gemini Apps integrations.
  • Gemini Files API: Engineered for developers passing large multimodal datasets to Gemini models. Supports individual files up to 2 GB across text, audio, image, and video formats, with a cumulative project storage allocation of 20 GB. Uploaded files remain stored for 48 hours before automatic deletion.
  • Inline API Payloads: For developers who pass raw data directly inside JSON request bodies without intermediate staging, the Gemini API enforces a 100 MB limit per request (50 MB for PDFs).

The following comparison table summarizes documented upload limits across Gemini interfaces:

Interface or Environment Max File Size (Docs) Max File Size (Video) Files Per Prompt Retention Period Documented Source Verified Date
Gemini Web Free 100 MB 2 GB (5 min max) 10 files Kept with Gemini Apps activity Google Gemini Help October 2026
Gemini Advanced 100 MB 2 GB (1 hour max) 10 files Kept with Gemini Apps activity Google Gemini Help October 2026
Google Workspace 100 MB 2 GB 10 files Policy dependent Google Workspace Admin Help October 2026
Gemini Files API 2 GB 2 GB Project quota bound 48 hours Google AI for Developers October 2026
Gemini Inline API 100 MB per request (50 MB for PDFs) 100 MB per request Request payload bound Request lifetime Google AI for Developers October 2026

Understanding these differences saves engineering time. Upload failures often stem from selecting an interface mismatched with the file's binary size.

Why does Gemini reject large PDF uploads when text fits the token window?

Many guides conflate Gemini's context window with raw disk file size limits, failing to explain why a 150 MB PDF gets rejected even when its text easily fits token limits. The confusion stems from treating transport layer upload boundaries and inference attention capacity as the same mechanism.

Google does not describe how the limit is enforced, but the check happens at upload, before the model pipeline. If a PDF measures 150 MB on disk because of high-resolution scanned page images, uncompressed raster graphics, or embedded print typography, the upload is rejected against the 100 MB limit. The model never evaluates the document text, because the file never finishes uploading.

Disk file size measures the raw binary footprint of data stored on a physical volume. In contrast, context window capacity measures tokens, the semantic and visual fragments used during neural network attention computations. A dense 40 MB database dump containing raw text can contain several million words, vastly exceeding the model context window. Conversely, a 150 MB PDF containing an architectural plan might contain only 1,200 words of text, fitting easily into less than 2,000 text tokens, yet it fails the web upload check.

Digital text extraction versus visual tile tokenization

Gemini processes PDF documents through two separate tokenization pipelines depending on document composition:

  • Digital Text Layers: When a PDF contains machine-readable text, the parser extracts raw character sequences directly. In English prose, one token corresponds to approximately four characters, or roughly 0.75 words. A 400-page plain text contract contains approximately 160,000 tokens. In a model with a 1 million token context window, this entire document consumes a small fraction of available memory.
  • Scanned Pages and Visual Artifacts: Scanned documents, photographic inserts, blueprints, and data visualizations cannot be parsed as plain character streams. Gemini treats these pages as visual inputs. According to Google's token documentation, an image of 384 pixels or less in both dimensions counts as 258 tokens, and larger images are tiled into 768 by 768 pixel tiles of 258 tokens each. At one tile per page, a 300-page scanned municipal record set consumes 77,400 image tokens, and more when pages span several tiles.

If that 300-page scanned document was exported at 600 DPI uncompressed color, the resulting PDF might weigh 220 MB on disk. The document would consume a manageable number of tokens during inference, but it cannot be uploaded to Gemini Web because its binary size exceeds the 100 MB transport threshold.

The following comparison table contrasts file formats, upload limits, and token processing mechanics:

File Format & Extension Gemini Web UI Limit AI Studio & Files API Limit Token Processing Mechanics Documented Source
PDF Documents (.pdf) 100 MB per file 2 GB per file Digital text, or 258 tokens per image tile Google Help / AI Docs
Office & Text (.docx, .txt, .md) 100 MB per file 2 GB per file Direct character parsing (~4 characters per token) Google Help / AI Docs
Spreadsheets (.xlsx, .csv) 100 MB per file 2 GB per file Serialized into tabular tokens and structured rows Google Help / AI Docs
Video (.mp4, .mov, .webm) 2 GB (5 min free / 1 hr Adv.) 2 GB per file About 263 tokens per second Google Help / AI Docs
Audio (.mp3, .wav) 100 MB (10 min free / 3 hr Adv.) 2 GB per file About 32 tokens per second Google Help / AI Docs
Code & Repositories (.zip, folders) 100 MB (up to 5,000 files) Upload files individually (2 GB each) Plaintext tokenization Google Help / AI Docs

Context memory accumulation across multi-turn prompts

Session history compounds token usage across multi-turn interactions. In the Gemini web app, every turn in an active thread is passed back into the attention window to maintain conversational continuity.

When you upload three 30 MB technical manuals totaling 350,000 tokens and proceed to ask eight successive analytical questions, Gemini recalculates attention over the accumulated text on every turn. As the active context expands, response latency increases. While Gemini maintains strong needle-in-a-haystack retrieval across deep contexts, processing massive multi-document inputs in chat sessions can cause subtle details to be overlooked. Clearing conversational history or starting a fresh chat resets the active context.

What constraints govern folders, ZIP archives, and code repositories in Gemini?

Uploading compound file structures introduces additional constraints that catch teams off guard. Gemini provides distinct ingestion pathways for standard directory structures, compressed ZIP archives, and specialized code repositories.

In the Gemini web app, dragging a folder directly into the chat interface initiates an automatic unpacking routine. The application parses the folder recursively, with each individual file counting toward the 10-file prompt maximum. If an uploaded folder holds 14 small text documents totaling 2 MB, it exceeds the file count ceiling, regardless of the negligible byte size.

ZIP archive files follow different rules:

  • Maximum Archive Size: A single ZIP file cannot exceed 100 MB.
  • Internal File Count: The archive cannot contain more than 10 internal files.
  • Media Restrictions: ZIP files uploaded to the web interface cannot contain audio or video files. An archive with nine text files and one short audio recording breaks this rule.

To support software engineering projects, Google provides a dedicated code import pipeline. Users can upload a project directory or connect a GitHub repository directly:

  • Code Folder Capacity: Accepts up to 5,000 individual files.
  • Total Archive Size: The combined payload must remain within 100 MB.
  • File Type Focus: The import is built for source code, configuration files, and documentation markdown rather than compiled binaries or business documents.

The following table compares compound file upload constraints:

Ingestion Method File Size Ceiling File Count Cap Audio/Video Allowed Primary Target Use Case
Web Chat Folder Drag 100 MB per file 10 files Yes (counts to limits) Ad-hoc document sets
Standard ZIP Upload 100 MB archive 10 internal items No (strictly blocked) Bundled research papers
Web Code Folder Import 100 MB combined 5,000 files No Codebases and text configs
GitHub Repository Link 100 MB repo 5,000 files No Source code inspection

Teams managing multi-component projects must select the correct pipeline. Uploading a software repository through standard folder upload runs into the 10-file limit if the repository contains more than 10 files.

Why does the Gemini Files API purge uploads after 48 hours?

Google provides the Gemini Files API to support multimodal developer pipelines that exceed chat payload sizes, but the infrastructure is designed as an ephemeral ingestion cache rather than a durable file repository. Google's developer documentation specifies that the Files API allows storing up to 20 GB of files per project, with a per-file maximum size of 2 GB, and files are stored for 48 hours.

Google offers the Files API at no cost in regions where the Gemini API is available, and files are deleted automatically after two days, which makes the Files API a staging area rather than a storage service. Developers can inspect metadata through the files.get method or delete files manually using files.delete. However, the API does not allow downloading user-uploaded files back to local environments. The files.download method is restricted to model-generated content such as rendered video assets.

Ephemeral developer storage bottlenecks

The 48-hour expiration creates significant engineering hurdles for production systems:

  • Broken Autonomous Agent Loops: Automated agents that record file identifiers in databases fail once the 48-hour retention window closes. Subsequent inference calls referencing expired file URIs return HTTP 404 errors, causing automated pipelines to halt.
  • Continuous Ingestion Bandwidth: Analyzing a permanent 15 GB corporate documentation library requires re-uploading the entire dataset every 48 hours. This generates recurring network overhead and introduces latency into scheduled batch analysis jobs.
  • Project Quota Bottlenecks: When an organization needs to evaluate 35 GB of historic customer tickets or technical documentation, the Files API rejects new uploads once the 20 GB project cap is reached. Developers must construct custom eviction logic to delete older files before staging new ones.
  • Isolated Developer Credentials: Files staged through the Files API are tied to a single Google Cloud project key. Domain experts, compliance reviewers, and operational teammates cannot view, organize, or audit the stored source documents.

Common error messages and account quota exceptions

Exceeding Gemini upload boundaries produces specific application warnings and API exceptions. Understanding the specific error message identifies the exact limitation encountered:

  • "Delete data to upload file": This warning appears in the Gemini web application when your internal Gemini Apps Activity storage reaches capacity. This storage quota is completely separate from Google Drive or Google One storage. Even if your Google One account has 2 TB of available space, a full Gemini Activity quota blocks further document uploads. To resolve this error in personal Google accounts, open Gemini Apps Activity and delete historical conversations that contain large document attachments. In Google Workspace accounts, only a Workspace administrator can delete Gemini Apps activity.
  • File size ceiling error (100 MB): Displayed in the web interface when an uploaded document, spreadsheet, or ZIP archive crosses the 100 MB threshold. Resolving this requires compressing images inside PDFs, splitting multi-part reports into separate volumes, or converting dense spreadsheets into plain CSV files.
  • More than 10 files in a prompt: Gemini accepts up to 10 files (subject to availability) per prompt, and each file inside an uploaded folder counts toward that limit.
  • Files API size and quota errors: The Gemini Files API rejects an individual file over 2 GB, and new uploads fail once a project holds its 20 GB allocation. Calling files.list and deleting unneeded files with files.delete frees the project quota.
  • "You've reached your limit for chats with files": Gemini applies rolling limits to how much you can upload and analyze in a period of time. The limit resets after some time, and Google AI Pro and Google AI Ultra plans have higher usage limits.
Fastio features

Query Large Document Collections Beyond Gemini Upload Limits

Connect your AI assistants to persistent Fastio workspaces with automated hybrid search and consolidated MCP tools. Monthly plans start with a 14-day free trial, credit card required.

How can teams analyze large document collections without hitting Gemini upload limits?

Organizations managing extensive corporate documentation, compliance libraries, or legal evidence sets cannot operate within 10-file prompt limits or 48-hour temporary API retention. Several technical patterns exist for evaluating large collections against LLMs, each with distinct tradeoffs:

  • Local Scripted File Splitting: Engineers use Python libraries such as pypdf or pdfcpu to divide large manuals into 50-page increments. While this keeps files under the 100 MB upload ceiling, it fragments semantic context, breaks cross-table references, and requires manual maintenance.
  • Google Cloud Storage Bucket Registration: The Gemini API allows registering files stored directly in Google Cloud Storage buckets (up to 2 GB per file) or passing public or signed HTTPS URLs (up to 15 MB per file). While this avoids moving file bytes to the temporary Files API, it requires setting up Google Cloud IAM permissions and leaves the underlying storage unindexed for semantic search.
  • Custom Vector Database Pipelines: Teams build Retrieval Augmented Generation pipelines using vector databases like Pinecone or Qdrant. While functional, this approach requires building custom parsing engines, managing embedding models, maintaining chunking boundaries, and synchronizing vector indexes as files change.
  • Intelligent Cloud Workspaces via Model Context Protocol: A direct approach connects Gemini to an intelligent cloud workspace. Instead of attaching massive files to prompts or re-uploading documents every 48 hours, teams keep their complete document library in a persistent workspace on Fastio workspace storage for agents.

Fastio provides an intelligent workspace platform designed for human and agent collaboration. When documents are placed in a workspace, Intelligence Mode indexes the content automatically using hybrid search, which unifies full-text keyword matching, semantic vector indexing, and structured search by metadata value. Rather than attaching a 400 MB technical manual to a prompt, an assistant queries the workspace and retrieves only the precise paragraphs needed to answer the question, complete with source citations.

Workspaces provide shared org-owned repositories, per-file version history, and a detailed activity log that records modifications across team members and agents. Documents can be imported from Google Drive, Dropbox, Box, and OneDrive. Fastio supports Cloud Sync for Google Drive, Dropbox, Box, and OneDrive on a schedule or on demand.

Connecting Gemini CLI or custom developer agents to Fastio takes minutes using the remote Model Context Protocol (MCP) server over Streamable HTTP. In the Gemini CLI configuration file (settings.json), declare the server under mcpServers:

{
  "mcpServers": {
    "fastio": {
      "httpUrl": "https://mcp.fast.io/mcp/code"
    }
  }
}

In Gemini CLI and its forks, using "httpUrl" selects Streamable HTTP, whereas "url" selects legacy SSE transport. Authenticate by running /mcp auth fastio in the client interface to initiate OAuth sign-in in your browser. Once connected, the agent calls the search tool on /mcp/code to query indexed documents. When an agent searches a multi-gigabyte corporate manual, Fastio returns the exact passages required for inference, using a small share of the context window instead of exhausting it. Review setup details in the Fastio MCP setup documentation.

For structured extraction across contracts, invoices, or technical specifications, teams deploy Metadata Views. Metadata Views extracts typed fields (Text, Integer, Decimal, Boolean, URL, JSON, Date & Time) from unstructured documents into a queryable table without template setup.

Monthly plans start with a 14-day free trial, which requires a credit card. Plans are Starter at $9.99/mo (3 seats, 250 GB storage, 5 workspaces, 100,000 credits a month), Business at $49.99/mo (10 seats, 5 TB storage, 50 workspaces, 600,000 credits a month), and Enterprise at $199.99/mo (30 seats included, more at $1 a seat up to 200 seats, 25 TB storage, 200 workspaces, 3,000,000 credits a month). Maximum upload sizes reach 25 GB on Starter, 50 GB on Business, and 100 GB on Enterprise. Credits meter AI operations, with overage billed at $10 per 100,000 credits. Extra storage is 1.5 cents per GB a month and extra bandwidth is 4 cents per GB. Explore complete pricing options on the Fastio pricing page.

Intelligent workspace search interface retrieving document citations for AI assistants

How do Gemini file size limits compare to Claude and ChatGPT?

Evaluating file upload constraints across frontier AI platforms highlights how different vendors manage data ingestion:

Anthropic Claude enforces distinct file handling between standard chat and project workspaces. In Claude chat, users can attach up to 20 files at up to 500 MB each. In Claude Projects, individual document uploads are capped at 30 MB, but the total file count is unlimited. Claude Projects has no fixed file-count cap; the practical ceiling is the model's context window, which ranges from 200,000 to 1 million tokens depending on the model. Once the cumulative tokens of project files approach the context boundary, users must prune documents or move to external retrieval.

OpenAI's help center documents an individual file cap of 512 MB for documents and 20 MB for images in ChatGPT, with a rolling limit of 80 files every 3 hours (free users can upload 3 files a day).

Google Gemini balances smaller web chat document caps with expansive media limits and a generous developer staging API. The Gemini web interface limits documents to 100 MB and 10 files per prompt, but supports 2 GB video files. Programmatically, the Gemini Files API handles 2 GB files with a 48-hour retention period, and inline API payloads support up to 100 MB (50 MB for PDFs).

The following comparison table contrasts file constraints across the three major platforms:

Platform and Environment Max Document Size Max Video Size File Count Limit Retention Model Primary Constraint
Google Gemini Web 100 MB 2 GB 10 files per prompt Kept with Gemini Apps activity Upload size ceiling
Google Gemini Files API 2 GB 2 GB Project quota bound 48 hours 20 GB project cap
Anthropic Claude Chat 500 MB Not supported 20 files per prompt Active chat Context memory bound
Anthropic Claude Projects 30 MB Not supported Unlimited file count Persistent in Project Model context window
OpenAI ChatGPT 512 MB Not listed 80 files every 3 hours Kept with the conversation Rolling upload caps

All three web chat environments share a common architectural boundary: they are optimized for focused, interactive dialogues rather than long-term knowledge management. When teams need to analyze collections spanning hundreds of documents, storing the corpus in an indexed workspace allows Gemini, Claude, and OpenAI assistants to query the same data without hitting individual vendor upload barriers.

Sources

References used to verify factual claims in this guide.

  1. Google Gemini web application caps document and PDF uploads at 10 files per prompt and 100 MB per file, stopping uploads larger than 100 MB.

  2. The Gemini Files API stores up to 20 GB per project with a 2 GB per-file cap and deletes files after 48 hours.

Frequently Asked Questions

What is the maximum file size you can upload to Gemini?

In the Gemini web interface, the maximum file size for documents, spreadsheets, text files, and code archives is `100 MB` per file. Video files can reach up to `2 GB`. For developers using the Gemini Files API, the individual file size ceiling is `2 GB` across all supported file types, with a total project storage limit of `20 GB`.

Can Gemini process PDF files larger than 100 MB?

The Gemini web interface rejects any PDF larger than `100 MB` at the upload stage, even if the document contains relatively few words. To process a PDF larger than `100 MB`, you must compress its images, split the document into smaller files under `100 MB`, stage it via the Gemini Files API which accepts up to `2 GB`, or index the document in a persistent workspace that connects to Gemini through the Model Context Protocol.

How do I upload large documents to Google Gemini?

To upload large documents to Gemini, choose the appropriate method for your file size. Files under `100 MB` can be attached directly to the web chat. For files between `100 MB` and `2 GB`, developers can use the Gemini Files API or register Google Cloud Storage objects directly. For document collections exceeding `2 GB` or requiring persistent access beyond `48` hours, store the files in an intelligent cloud workspace and query them through Gemini CLI using MCP.

Does Google Gemini delete uploaded files after 48 hours?

Files uploaded through the developer Gemini Files API are automatically purged after `48` hours. In the consumer Gemini web app, uploaded files remain stored in your Gemini Apps Activity until you manually delete them or clear your conversation history.

What causes the 'Delete data to upload file' error in Gemini?

The 'Delete data to upload file' error occurs when your internal Gemini Apps Activity storage quota is full. This storage pool is separate from your Google Drive and Google One storage allocations. To resolve the error, visit Gemini Apps Activity and delete older chat threads and file attachments.

Can you upload ZIP files or folders directly into Google Gemini?

You can upload ZIP files and folders to the Gemini web interface subject to specific limits. ZIP archives are capped at `100 MB`, cannot exceed `10` internal files, and cannot contain audio or video files. Dragging a standard folder unpacks the contents, with each file counting against the `10`-file per prompt limit. Specialized code imports accept folders with up to `5,000` files within a combined `100 MB` limit.

How does Fastio allow Gemini assistants to query files larger than 100 MB?

Fastio stores files in shared workspaces with automatic hybrid search indexing. When Gemini CLI connects to Fastio via the Model Context Protocol, the assistant calls the search tool to retrieve only the relevant passages from indexed documents, completely bypassing prompt upload limits.

Related Resources

Fastio features

Query Large Document Collections Beyond Gemini Upload Limits

Connect your AI assistants to persistent Fastio workspaces with automated hybrid search and consolidated MCP tools. Monthly plans start with a 14-day free trial, credit card required.