Skip to content

Routing and reliabilityBrief

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

Anthropic's first-party Messages API now takes 128 MB, but the same Claude model on a cloud platform may cap at 20 MB. A fallback that cannot accept the payload turns an outage into a 413. Here is how to route, reject or downsize before that happens.

By INFRO Editorial

Published

5 min read

Luminous routing paths connecting one application node to many AI model endpoints

In short

Anthropic raised the first-party Messages limit from 32 MB to 128 MB on 28 October 2026 1, 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 runsMaximum request size
First-party Claude API, Messages and Token Counting128 MB
First-party Message Batches API256 MB
First-party Files API500 MB
First-party Sessions, Agents, Environments32 MB
Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed), Microsoft Foundry32 MB
Claude Models on Google Cloud (Google managed)30 MB
Amazon Bedrock20 MB
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.

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

preflight.py
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 readers ask

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.

From the team that builds it

Where this shows up in INFRO

INFRO is a control plane in front of the provider accounts you already hold. The capabilities below are the parts of it this article touches, each with the documentation that defines its behaviour.

  • Routing rules

    Available with a plan

    If-rules on a route send matching requests to their own targets, by metadata, feature, end user, key, project, prompt size, streaming, images, tools or time of day. Failure rules decide per failure kind whether to retry, move on or stop.

    Read the documentation for Routing rules
  • Automatic failover

    Available with a plan

    A route that times out or 5xxs before the response starts is retried elsewhere without your client seeing it.

    Read the documentation for Automatic failover
  • Health-aware routing

    Available with a plan

    Named routes use priority or weighted targets over your own connections, with health checks, retries and failover.

    Read the documentation for Health-aware routing

INFRO accounts are self-serve. Provider usage is billed to you by your providers; INFRO charges a software subscription and takes 0% of model spend. See plans.

Sources

Numbered in order of first citation. Each was opened and checked against the claim on the date shown.

  1. 1.Claude Platform release notes (opens in a new tab) — Anthropic. Accessed Nov 7, 2026.
  2. 2.API overview: request size limits (opens in a new tab) — Anthropic. Accessed Nov 7, 2026.
  3. 3.File inputs (opens in a new tab) — OpenAI. Accessed Nov 7, 2026.
  4. 4.Images and vision (opens in a new tab) — OpenAI. Accessed Nov 7, 2026.

About this article

Read Anthropic's release notes and API overview, and OpenAI's file inputs and images-and-vision guides, on 2026-11-07. Google Gemini's file-input pages could not be read from the allowed hosts, so no Gemini limit and no OpenAI request-size figure is stated; check those yourself.

Last checked against its sources on . The next review is due by . No separate named reviewer is recorded for this article.

How articles are written, sourced and corrected is set out in the editorial standards.