# Claude's 128 MB request limit: do your fallbacks accept it?

URL: https://infro.io/blog/claude-s-128-mb-request-limit-do-your-fallbacks-accept-it
Author: INFRO Editorial (https://infro.io/blog/editorial)
Publisher: INFRO
Published: 2026-11-07
Last modified: 2026-11-07
Last reviewed: 2026-11-07 (next review due 2026-12-07)
Topic: Routing and reliability
Format: Brief

> Anthropic raised the first-party Messages limit from 32 MB to 128 MB on 28 October 2026 [^release-notes], but cloud-hosted Claude and other providers keep their own caps. Compare every fallback's limit to the request's size before sending, and route, reject or downsize.

Key takeaways:
- Anthropic's first-party Messages and Token Counting limit is 128 MB; the same model on Bedrock is limited to 20 MB and on Google-managed Claude to 30 MB.
- A 413 is a client error, so a failover built for timeouts and 5xx will not rescue an oversized request.
- Check the smallest limit among a route's targets before sending, then route to a target that fits, reject, or downsize.
- Prefer file references (Files API, file IDs) over inline base64 for big media, and measure the encoded body, not the file.

## 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 |

Table: Anthropic's published request limits as read on 2026-11-07. Anthropic says to consult each platform's documentation for current values.[2]

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.

> **Example: Illustrative numbers**
> A 70 MB PDF plus three 8 MB scans, sent as base64, is about 94 MB × 4/3 ≈ 125 MB. It fits a 128 MB primary with little room to spare, and it is more than six times Bedrock's 20 MB. These figures are made up to show the arithmetic.

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

1. **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.
2. **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".
3. **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

```python
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.

## Questions

### Does a 413 trigger failover on a route?

Not by default. Gateway failover as INFRO ships it retries a request that times out or returns a 5xx before the response starts. A 413 is a request-size error, so decide in your failure rules what it should do, and better, prevent it with a size check before sending.

### Should I just send every large file through the Files API?

It avoids inline bloat, but file IDs are provider-specific. A file uploaded to one provider is not available to a fallback on another, so your gateway or application must keep the original bytes to re-upload.

## Sources

1. Claude Platform release notes — Anthropic. https://platform.claude.com/docs/en/release-notes/overview (accessed 2026-11-07)
2. API overview: request size limits — Anthropic. https://platform.claude.com/docs/en/api/overview (accessed 2026-11-07)
3. File inputs — OpenAI. https://developers.openai.com/api/docs/guides/file-inputs (accessed 2026-11-07)
4. Images and vision — OpenAI. https://developers.openai.com/api/docs/guides/images-vision (accessed 2026-11-07)
