What changed, and what did not
On October 28, 2026 Anthropic raised the maximum request size for the Messages API and the Token Counting API from 32 MB to 128 MB on the first-party Claude API.1 That is good news for anyone sending long PDFs, many images or audio inline. It is also a trap for a multi-provider setup, because the raise applies to Anthropic's own endpoint only. A request that Claude accepts at 90 MB can be refused by every fallback behind it.
Exceeding a limit returns a 413 request_too_large error.2 A 413 is a client error. A failover policy tuned for timeouts and 5xx responses will not treat it as a provider fault, and retrying the same body on the same target will fail identically. The risk is specific: the primary has an incident, traffic moves to a target with a smaller cap, and the largest requests, the ones users care most about, fail first.
Limits that were confirmed
Anthropic publishes limits per endpoint and per platform.
| Where Claude runs | Maximum request size |
|---|---|
| First-party Claude API, Messages and Token Counting | 128 MB |
| First-party Message Batches API | 256 MB |
| First-party Files API | 500 MB |
| First-party Sessions, Agents, Environments | 32 MB |
| Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed), Microsoft Foundry | 32 MB |
| Claude Models on Google Cloud (Google managed) | 30 MB |
| Amazon Bedrock | 20 MB |
So the same model family spans a 6x range depending on the route. If your fallback for Claude is Claude on Bedrock, your effective limit for failover purposes is 20 MB, not 128.
For other providers, this article states no number. OpenAI's guides describe how files arrive, not a verified byte cap I could read: the Responses API takes file_data (base64), file_id and file_url, while Chat Completions accepts only PDF files and has no file_url option.3 Images can be passed as a URL, a base64 data URL or a file ID.4 Look up the current request cap for each provider you fall back to and put it in your route configuration.
Measure the right thing
Limits apply to the request body, not the file. Base64 turns every 3 bytes into 4 characters, so a 60 MB PDF sent inline is roughly 80 MB on the wire before JSON overhead and the text around it. Multiple attachments add up.
The practical rule: compute the encoded body size at the edge of your gateway, after you have assembled the final request, and compare it to the smallest limit among the targets you are willing to use for that request.
Three ways to handle an oversized request
- Route. Send requests above a threshold only to targets that accept them, and give those a shorter fallback list, or none. A big-payload route with a single healthy-or-fail target is honest; a fallback that cannot take the payload is not a fallback.
- Reject. Return a clear 413 or 400 to your caller from the gateway, naming the limit and the size. This is cheaper than a provider round trip and gives the user something actionable, such as "split this document".
- Downsize. Reduce the body before sending: recompress images, drop pages, downsample audio, or split the PDF and process chunks. This changes the input, so run it only where the product tolerates it and record that it happened.
A fourth option, for media that is large and reused, is to upload once and reference by ID, which keeps the request body small. Anthropic's Files API takes up to 500 MB per file.2 OpenAI also supports file IDs.3 The catch is portability: an ID is valid only at the provider that issued it, so a failover target needs its own upload from the original bytes.
A pre-flight check
import base64, json
# Limits you have confirmed per target, in bytes. Fill from provider docs.
LIMITS = {
"anthropic-direct": 128 * 1024**2,
"bedrock-claude": 20 * 1024**2,
"google-managed-claude": 30 * 1024**2,
}
def body_size(payload: dict) -> int:
return len(json.dumps(payload).encode())
def usable_targets(payload: dict, targets: list[str]) -> list[str]:
size = body_size(payload)
return [t for t in targets if size <= LIMITS[t]]
def decide(payload, targets):
ok = usable_targets(payload, targets)
if not ok:
return ("reject", "request_too_large") # or downsize, then retry the check
return ("route", ok)Keep the order of targets as your priority order and send only to the filtered list. If the list shrinks to one, you know before the call that this request has no failover, and you can log it.
Doing this in a gateway
If you run INFRO, routing rules can send requests to their own targets by prompt size or by whether they contain images, and failure rules decide per failure kind whether to retry, move on or stop. Use a size rule to keep large requests off targets with smaller caps, and set the failure rule for request-size errors to stop rather than retry. Confirm in the docs how a rule measures size, since a prompt-size threshold is not necessarily a byte limit.
Then test it: build a 25 MB and a 100 MB request, take the primary down in staging, and see which one survives. A failover drill that only sends small prompts proves nothing about this.
Checklist
- Each route target has a confirmed byte limit recorded.
- Size is measured on the encoded body at the gateway.
- Oversized requests are routed, rejected or downsized, never blindly failed over.
- Downsizing is logged per request.
- A drill covers a request between the smallest and largest limit.
