C.W.K.
Stream
Lesson 04 of 08 · published

Regions, Quota, and Rate Limit Reality

~14 min · rate-limits, quota, regions, throughput

Level 0Observer
0 XP0/64 lessons0/13 achievements
0/150 XP to next level150 XP to go0% complete

Quota is a per-tier, per-org budget

Every Anthropic Console org has rate limits expressed as requests per minute (RPM), input tokens per minute (ITPM), and output tokens per minute (OTPM), scoped to each model. New orgs start in lower usage tiers and graduate based on spend and account history. Knowing your current tier is part of capacity planning, not a launch-day surprise.

Bedrock and Vertex have different shapes

On Bedrock, quota is per-AWS-account, per-region, expressed as model invocation quotas you raise through AWS support. On Vertex, quota is per-GCP-project, also raised through cloud support. The math you do for direct API capacity does not transfer to either cloud — recheck the cloud's console before promising throughput numbers.

What 429 looks like

When you hit a rate limit, the API returns 429 Too Many Requests with a retry-after header. The SDK respects that automatically up to its default retry budget. Beyond that, your code is responsible: backoff, queue, drop, or degrade — pick one before traffic forces you to choose live.

Principle: Capacity is a product feature. Treat quota tiers and regional latency as architecture inputs, not deploy-day surprises.

Code

Read rate-limit headers (Python)·python
from anthropic import Anthropic

client = Anthropic()
response = client.messages.with_raw_response.create(
    model="claude-sonnet-4-6",
    max_tokens=128,
    messages=[{"role": "user", "content": "hi"}],
)
for h in (
    "anthropic-ratelimit-requests-remaining",
    "anthropic-ratelimit-input-tokens-remaining",
    "anthropic-ratelimit-output-tokens-remaining",
    "retry-after",
):
    print(h, response.headers.get(h))
Backoff on 429 with the SDK helper·python
from anthropic import Anthropic, RateLimitError
import time, random

client = Anthropic(max_retries=3)  # SDK retries 429/5xx automatically up to this many times.

def call_with_backoff(messages, attempts=5):
    delay = 1.0
    for i in range(attempts):
        try:
            return client.messages.create(
                model="claude-sonnet-4-6",
                max_tokens=512,
                messages=messages,
            )
        except RateLimitError as e:
            wait = float(e.response.headers.get("retry-after", delay))
            time.sleep(wait + random.random())
            delay *= 2
    raise RuntimeError("exhausted backoff")

External links

Exercise

List your current per-model RPM and TPM limits (open the Anthropic Console). For each, write the smallest input shape that would saturate it and the planned response (queue, degrade, batch).
Hint
Saturating ITPM with a single user message is easier than people think — long PDFs and image attachments get there fast.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.