Brief in AI engineering
Image and file input limits for model APIs
States per vendor which images and files a model API accepts, size and page limits, and image token cost.
- Changed 4 Dec 2026
- Sources read 4 Dec 2026
- 10 sources
- Version 1
- About 1,500 tokens
- Needed by both models tested, 4 Dec 2026
Anthropic counts 28 px patches, OpenAI 32 px patches (older models: 512 px tiles), Gemini fixed budgets set by media_resolution. Images per request: 600 (Anthropic), 1,500 (OpenAI), 3,600 (Gemini). PDF pages: 600 (Anthropic), 1,000 (Gemini).
Facts
| Limit | Anthropic | OpenAI | Google Gemini |
|---|---|---|---|
| Images per request | 600 [1] | 1,500 [4] | 3,600 [7] |
| Image size limit | 10 MB base64 on the Claude API [1] | 512 MB total request payload [4] | not stated |
| Largest image | 8000x8000 px [1] | 30,000 patches after resizing [4] | not stated |
| Image tokens | ⌈width / 28⌉ × ⌈height / 28⌉ [1] | ⌈width / 32⌉ × ⌈height / 32⌉ patches × model multiplier [4] | 258 per 768x768 tile [7] |
| PDF size | 128 MB per request [2] | under 50 MB per file [5] | 50 MB per file [9] |
| Files API storage | 1 TB per organization [3] | 2.5 TB per project [6] | 20 GB per project [10] |
| Files API lifetime | until deleted [3] | until deleted [6] | 48 hours [10] |
- Anthropic: 100 images per request on models with a 200k-token context window [1].
- Anthropic: 5 MB base64 per image on Amazon Bedrock [1].
- Anthropic: above 20 images in one request, a stricter pixel limit applies to every image; 3,000 px per side stays under it [1].
- Anthropic: Claude 4.7 and later downscale images to at most 2,576 px long edge and 4,784 tokens [1].
- Anthropic: other models downscale images to at most 1,568 px long edge and 1,568 tokens [1].
- Anthropic: an oversized image in a
tool_resultis rejected, not downscaled [1]. - Anthropic: 100 PDF pages per request when the context window is under 1M tokens [2].
- Anthropic Files API:
expires_in_secondsfrom 3,600 (1 hour) to 7,776,000 (90 days) [3]. - Anthropic Files API: out of beta; the
files-api-2025-04-14header is optional [3]. - OpenAI: an image over 30,000 patches is rejected, not resized [4].
- OpenAI image token multiplier: 1.2 on current models such as GPT-6 Astra and GPT-5.5 [4].
- OpenAI
detailvalues:low,high,original,auto; the default isauto[4]. - OpenAI
detail: "high"on current models: up to 2,500 patches [4]. - OpenAI file inputs: 50 MB combined across all files in one request [5].
- OpenAI Chat Completions accepts only PDF files [5].
- OpenAI Responses API also accepts spreadsheets, Word files, slides, text and code files [5].
- OpenAI: .docx, .pptx and .txt files give text only; PDFs give text and page images [5].
- OpenAI spreadsheets: only the first 1,000 rows per sheet are parsed, plus a generated summary [5].
- OpenAI Files API:
purpose=batchfiles expire after 30 days by default;expires_aftersets a policy [6]. - Gemini: an image with both sides at most 384 px costs 258 tokens [7].
- Gemini 4 and 3
media_resolutionimage tokens:low280,medium560,high1120,ultra_high2240 [8]. - Gemini 4 and 3: the default image budget is 1120 tokens; the default PDF page budget is 560 tokens [8].
- Gemini:
ultra_highcan be set only per content item [8]. - Gemini 4 and 3 audio: 25 tokens per second at
low,medium,highand the default [8]. - Gemini: 2,000 pages or slides per Office file [9].
- Gemini: the 50 MB, 1,000-page and 2,000-page limits apply both inline and through the Files API [9].
- Gemini spreadsheets: up to 50,000 cells per sheet [9].
- Gemini: requests larger than 100 MB in total must use the Files API [10].
Use it for
- Choosing inline bytes or an uploaded file id for a given file size.
- Estimating image and page token counts before a request.
- Splitting large PDFs or image sets to stay under per-request counts.
- Not for prices; not for Bedrock, Vertex or Azure limits.
Sources
- [1] Images and vision (vision), Anthropicread 4 Dec 2026
- [2] PDF support, Anthropicread 4 Dec 2026
- [3] Files API (files), Anthropicread 4 Dec 2026
- [4] Images and vision, OpenAIread 4 Dec 2026
- [5] File inputs, OpenAIread 4 Dec 2026
- [6] Upload file (API reference), OpenAIread 4 Dec 2026
- [7] Image understanding, Googleread 4 Dec 2026
- [8] Media resolution, Googleread 4 Dec 2026
- [9] Document understanding, Googleread 4 Dec 2026
- [10] Files API, Googleread 4 Dec 2026
Tested
Tested 4 Dec 2026: claude-haiku-5-5 stated 5 of its 35 facts without this page and 33 with it; claude-fable-5-2 stated 9 of its 35 facts without this page and 35 with it.
Changes
- Opened on mysi.4 Dec 2026
Cite as: mysi, Image and file input limits for model APIs, mysi.dev/llm-image-and-file-limits, version 1, changed 2026-12-04. Text and data CC BY 4.0.