Home / Docs / Rate limits

Rate limits

How throttling works, what a 429 means here, and how to build a client that does not trigger one.

Limits keep shared upstream capacity fair. They apply per account, not per key, so adding keys does not raise your ceiling.

What is limited

DimensionBehaviour
Concurrent requestsIn-flight requests per account. The usual cause of a 429.
Requests per minuteSustained call rate.
Tokens per minuteCombined input and output throughput.

Unlimited plans apply fair-use limits rather than a credit balance — they remove the per-token charge, not the concurrency ceiling.

Handling 429 properly

  1. Back off exponentially with jitter — 1s, 2s, 4s, 8s, each plus or minus a random fraction.
  2. Cap concurrency client-side with a semaphore instead of firing everything and retrying the rejects.
  3. Queue batch work rather than parallelising it maximally; throughput is bounded by tokens per minute, not by how many sockets you open.
  4. Treat 529 differently from 429 — that is upstream capacity, not you, and usually clears within seconds.
import asyncio

sem = asyncio.Semaphore(8)      class=class="s">"c"># ceiling on concurrency, tune to your plan

async def ask(client, body):
    async with sem:
        return await client.post(class="s">"/v1/messages", json=body)
Agentic tools such as Claude Code fan out aggressively by design. If you see 429s during heavy agent use, lower the tool's parallelism before raising your plan.

Reducing pressure instead of retrying