Claude API Request Size Limits 2026: 128 MB
Claude API raised Messages and Token Counting request limits from 32 MB to 128 MB on Oct 28, 2026. Bedrock is 20 MB, Google Cloud 30 MB.
The short version
Anthropic shipped a four-times increase in the first-party Claude API request body ceiling, and the release note is one sentence long. On October 28, 2026, the maximum request size for the Messages API and the Token Counting API went from 32 MB to 128 MB.
For developers, this is mostly good news and mostly irrelevant news at the same time, and telling the two apart is the useful skill. If your requests were being rejected with a 413 request_too_large error because you were inlining images, PDFs, or large tool results into a Messages payload, the change means you have roughly four times the headroom on the first-party API. If you are calling Claude through Amazon Bedrock, Claude Models on Google Cloud, or Microsoft Foundry, almost nothing changed, because those partner platforms set their own limits and none of them moved to 128 MB.
There is a second, quieter story in the same documentation update. The full endpoint table reveals that Sessions, Agents, and Environments still cap out at 32 MB. Those are the Managed Agents beta surfaces. So the platform now has a four-way spread of ceilings that range from 32 MB to 500 MB, and the one that matters for you depends entirely on which endpoint and which platform your code is pointed at.
The four ceilings, endpoint by endpoint
Here is the complete table as published in the Claude API overview documentation, verified October 30, 2026. Every one of these applies to the first-party Claude API.
| Endpoint | Maximum request size | What changed Oct 28 |
|---|---|---|
| Messages API | 128 MB | Raised from 32 MB |
| Token Counting API | 128 MB | Raised from 32 MB |
| Message Batches API | 256 MB | Unchanged |
| Files API | 500 MB | Unchanged |
| Sessions, Agents, Environments | 32 MB | Unchanged |
Two details in that table are easy to misread. The Files API at 500 MB is not a request body limit in the ordinary sense; it is the maximum size of a single uploaded file, and total storage is capped at 1 TB per organization. And the Message Batches API at 256 MB is generous because a batch request contains many messages at once, so it needs proportionally more room.
The 32 MB line at the bottom is the one to internalise if you are building on Managed Agents. The Sessions, Agents, and Environments endpoints were not part of the increase. If you assumed that every Anthropic surface gained headroom on October 28, that assumption is wrong for exactly the surface where agent workloads concentrate the most bytes.
Whatever the ceiling, exceeding it produces the same error: 413 request_too_large.
The part that matters more: partner platforms did not move
The 128 MB number is a first-party number. Anthropic operates the Claude API directly, but it also distributes Claude through cloud platforms, and those platforms enforce their own limits. This is the single most important table in this article for anyone running Claude in production on cloud infrastructure, because the gap between platforms is larger than the change itself.
| Platform | Operator | Max request size |
|---|---|---|
| Claude API (first-party) | Anthropic | 128 MB |
| Claude Platform on AWS | Anthropic | 32 MB |
| Claude Models on Google Cloud (Anthropic managed) | Anthropic | 32 MB |
| Microsoft Foundry | Anthropic | 32 MB |
| Claude Models on Google Cloud (Google managed) | 30 MB | |
| Amazon Bedrock | Amazon | 20 MB |
Read that table carefully, because the row that surprises most people is the third one. There are two different ways to get Claude on Google Cloud. Claude Models on Google Cloud (Anthropic managed) is operated by Anthropic and sits at 32 MB. Claude Models on Google Cloud (Google managed) is operated by Google and sits at 30 MB. Same cloud, same model family, two different ceilings. If your team runs a multi-cloud strategy, this is the sort of detail that produces a bug report which only reproduces in one region.
Anthropic's own documentation closes the section with a sentence worth quoting verbatim in your internal runbooks: Consult your platform's documentation for current values. That is an explicit warning that the partner limits are not slaved to the first-party number. They are independent, they can change separately, and a 128 MB assumption baked into your client will break silently if you switch providers.
The practical consequence is a portability rule: if you want one request-size budget that holds across every Claude deployment path, design for 20 MB. That is the floor, set by Bedrock. Anything larger works only on specific platforms, and the difference between first-party and partner behaviour is precisely the kind of thing that passes testing on one account and fails on another.
Request size is not image size
The most common confusion after this change is assuming that a 128 MB request body means bigger images are accepted. They are not. Image handling is governed by a separate set of limits, and a request can be well under 128 MB and still be rejected on image grounds.
The maximum dimensions for a single image are 8000x8000 pixels. The maximum size per image is 10 MB base64-encoded on the Claude API and on Claude Models on Google Cloud in Google-managed mode, but only 5 MB base64-encoded on Amazon Bedrock, and 10 MB on claude.ai. So a single image that works perfectly on the first-party API can be rejected on Bedrock even when the request body is tiny.
There is also a count-based rule that interacts with the request body limit. The maximum number of images is 20 per message on claude.ai, 100 per API request for models with a 200K-token context window, and 600 per API request for all other models. If a single API request contains more than 20 images, a stricter per-image dimension limit applies to every image in that request. Images that exceed it are rejected with an invalid_request_error whose message references many-image requests and states the current limit in pixels.
Anthropic's guidance for staying under that limit on all platforms is either to resize each image so that neither dimension exceeds 3,000 px, or to keep the request to 20 or fewer image and document blocks. Note that on Bedrock and in Google-managed mode, document blocks such as PDFs also count toward the image threshold, which is why a PDF-heavy request can trip a rule that reads like an image rule.
One more constraint that catches people out: Anthropic explicitly warns that although the API supports up to 600 images per request, request size limits can be reached first. A request with many large images will hit 128 MB before it hits 600 images.
The resolution tier table that decides your token bill
Even before any of those limits apply, Claude may downsize your image. Claude processes images in 28x28 pixel patches, each patch being one visual token, so an image costs the ceiling of width divided by 28, multiplied by the ceiling of height divided by 28, visual tokens. Each model has a maximum native resolution expressed as a long-edge limit and a visual-token limit, and images larger than either limit are downscaled before processing.
| Resolution tier | Models | Max long edge | Max visual tokens |
|---|---|---|---|
| High-resolution | Claude 4.7 and later | 2,576 px | 4,784 |
| Standard | All other models | 1,568 px | 1,568 |
Here is what that means in practice, using Anthropic's published cost examples for a 1000x1000 image. On the standard tier it is not resized and costs 1,296 visual tokens. On the high-resolution tier it is also not resized and costs the same 1,296 tokens, but a 3840x2160 image is downsized to 2576x1449 and costs 4,784 tokens, where the same 4K image on the standard tier is downsized to 1456x819 and costs 1,560 tokens. High-resolution images can use up to roughly three times more visual tokens than the same image on a standard-tier model.
Anthropic's own worked example prices this out. At Claude Haiku 4.5's $1 per million input tokens, the 1000x1000 image costs about $1.30 per thousand images. At Claude Opus 5.5's $4 per million on the high-resolution tier, the same image costs about $5.18 per thousand and the 4K image about $19.14 per thousand. If you do not need the additional fidelity that high resolution provides for computer use, screenshot understanding, and dense documents, downsizing before you upload is the cheapest optimization available.
There is one case where the API refuses to downscale. Screenshots and zoom images that you return to the computer use and browser use toolsets are rejected with a validation error instead of being resized, so you must resize those in your application before returning them. For every other oversized image, you can opt into an error instead of a silent downscale by setting the image block's transformations field with oversized_image: "error". The default is "downsize", which scales the image to fit without telling you, and for coordinate-driven workflows where the model has to reason about pixel positions, that silent rescale is a correctness bug waiting to happen.
Handling the limit in code
Here is a request that stays comfortably inside the new ceiling, using the current API version header and the standard bearer authentication pattern.
curl https://api.anthropic.com/v1/messages \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2026-10-21' \
-H "Authorization: Bearer $ANTHROPIC_API_KEY" \
--max-time 600 \
-d '{
"model": "claude-opus-5-5",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Summarise this diff and flag the two riskiest hunks." }
]
}'
And here is the pattern that matters for large payloads: upload once, reference by file_id, and stop re-sending bytes on every turn. The upload goes to the Files API as multipart form data.
import os
import base64
import anthropic
client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
def build_image_block(path, max_edge=3000):
"""Downscale before upload so a request stays under the many-image dimension rule."""
raw = base64.b64encode(open(path, "rb").read()).decode()
return {
"type": "image",
"source": { "type": "base64", "media_type": "image/png", "data": raw },
"transformations": { "oversized_image": "error" },
}
# Upload once. The Files API accepts files up to 500 MB each.
uploaded = client.files.upload(
file=("report.pdf", open("report.pdf", "rb"), "application/pdf"),
)
# Reference it forever. The request body stays tiny.
resp = client.messages.create(
model="claude-opus-5-5",
max_tokens=2048,
messages=[{
"role": "user",
"content": [
{"type": "document", "source": {"type": "file", "file_id": uploaded.id}},
{"type": "text", "text": "List the three highest-risk findings in this report."},
],
}],
)
print(resp.content[0].text)
# Count tokens before sending a big request.
count = client.messages.count_tokens(
model="claude-opus-5-5",
messages=[{"role": "user", "content": "Hello, world"}],
)
print("input tokens:", count.input_tokens)
Two things in that second example are worth calling out. The transformations block with oversized_image: "error" means an oversized image is rejected with the image's dimensions and the largest dimensions that fit, instead of being silently scaled down. That is the setting you want for coordinate workflows. And the count_tokens call is worth making before any large send, because the Token Counting endpoint moved to 128 MB along with Messages, which means it can now validate a payload that would previously have been impossible to even measure.
One caution on the Files API route: files uploaded this way are not downloadable, and they are scoped to the workspace they were uploaded in. Anthropic warns against accepting file IDs from untrusted sources, because any request in the same workspace can reference them. If your application accepts a file ID from a user or a third party, validate it before passing it to Claude.
What to actually change in your codebase
Here is the decision path, in order.
- If you are on the first-party API and were hitting 413: you have four times the headroom now. No code change is required, but re-test the largest request in your suite, because a request that previously failed at the edge may now be accepted and billed instead of rejected for free.
- If you are on Bedrock or Google-managed Google Cloud: nothing changed. Your ceiling is still 20 MB or 30 MB. If you were planning a migration to the first-party API to get the new limit, that migration still works, but the smaller partner ceiling is a useful forcing function for the redesign you should be doing anyway.
- If you are building on Managed Agents: the 32 MB Sessions, Agents, and Environments limit did not move. Plan for that constraint rather than assuming the platform-wide increase applies to you.
- If you send many images: resize to under 3,000 px per dimension, or drop to 20 or fewer image and document blocks per request, and move large payloads to the Files API.
- If you rely on pixel coordinates: set
oversized_image: "error"so a silent downscale fails loudly instead of corrupting the coordinate space your prompt assumes.
If you want to run the same large-payload workload across several upstream providers without maintaining a separate client for each, a routing aggregator is the practical shortcut. FreeModel exposes an OpenAI-compatible endpoint in front of multiple upstream providers, so you can point one integration at different model IDs and compare how each handles the same oversized payload, including which one rejects it first and at what boundary. For teams that already run a gateway, Portkey adds observability and guardrails on top, which is useful when the goal is to see exactly where a request fails rather than just that it did.
Verdict
This is a good change and a small one, and the honest summary is that it depends on where you are pointed.
If you call the first-party Claude API directly, four times the request headroom is a real operational improvement, and for image-heavy or tool-result-heavy workloads it removes a class of failures outright. The Messages and Token Counting endpoints at 128 MB, Message Batches at 256 MB, and the Files API at 500 MB together form a coherent ladder: upload big things once, reference them by ID, and keep the per-request body small.
If you call Claude through a cloud platform, this is a non-event. Bedrock at 20 MB, Google-managed Google Cloud at 30 MB, and the Anthropic-operated platform deployments at 32 MB all mean your ceiling is unchanged. The 128 MB number is a first-party fact, and the gap between it and the smallest partner limit is now large enough that a client written against the first-party API can break when the same code is pointed at a partner deployment.
And the part most write-ups will skip: the request body limit was never the binding constraint on images. Per-image dimensions of 8000x8000 pixels, per-image size of 10 MB base64 on the first-party API but 5 MB on Bedrock, a many-image rule that tightens past 20 images, and resolution tiers that silently downscale before tokenisation are all independent of the 128 MB headline. If you are shipping a vision pipeline this quarter, those are the limits that will actually shape your architecture.
Sources
- Claude Platform API overview — request size limit table and partner platform limits, verified October 30, 2026
- Claude API release notes — the October 28, 2026 entry raising the Messages and Token Counting limits from 32 MB to 128 MB
- Vision documentation — image count and dimension limits, per-image size caps, resolution tiers, and visual token costs
- Files API documentation — 500 MB per-file limit, 1 TB per-organization storage, and the non-downloadable file caveat
- Claude Platform pricing — model rates used in the visual token cost examples
Related Articles
- AI API Vision in 2026: 9+ Providers Compared — how image tokenisation works across providers
- Cloudflare Workers 64 MiB: AI API Bundles — the same class of ceiling, one layer down in the stack
- Claude Cowork Merge 2026: Developer Migration — the platform consolidation behind the Managed Agents surfaces
- Claude Sonnet 5 API Pricing — current per-token rates for the models this limit applies to