Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4133 pages

APIs and integrations

OpenAI, Anthropic and Gemini API Rate Limits: What Each One Counts

In short

OpenAI vs Anthropic API rate limits break differently because each counts a different thing: OpenAI counts the larger of max_tokens and an input estimate against TPM, Anthropic counts only uncached input and the output actually generated, and Gemini counts input tokens per Google Cloud project with a daily request quota. Port a client unchanged and its throttling logic will misjudge the headroom.

How do OpenAI vs Anthropic API rate limits differ in what they count?

All three meter requests and tokens per minute, but the token side is defined differently, and that decides how much a cached prompt or a generous max_tokens costs you in headroom. The table sets the definitions side by side.

QuestionOpenAIAnthropicGemini
DimensionsRPM, RPD, TPM, TPD, images per minute, audio minutes for some modelsRPM, input tokens per minute (ITPM), output tokens per minute (OTPM), per model classRPM, input TPM, RPD; images per minute or TPD on some models
Does max_tokens use quota?Yes: the larger of max_tokens and an estimate from request characters is countedNo: OTPM counts tokens actually generatedNot stated on the page
Cached inputNot addressed on the rate limits pageCache reads excluded from ITPM; cache writes countNot addressed on the rate limits page
ScopeOrganization and projectOrganization, with optional lower workspace limitsProject, not API key

Checked against: source 1, source 2, source 3

How does each vendor place you in a usage tier?

Anthropic places an organization in a tier automatically from usage history and account standing. New or thin accounts may start in an Evaluation tier below the published limits, then move through Start, Build and Scale; Custom is arranged with sales. You can ask for more with Request tier increase in the Console.

OpenAI has a Free tier and three paid ones, Build, Launch and Grow. The upgrade is automatic as total credit purchases cross each threshold. OpenAI stresses that a tier describes limits only and does not grant access to any particular model.

Gemini moves a project from Free to Tier 1 once an active billing account is linked. Tiers 2 and 3 depend on cumulative Google Cloud spend on that billing account plus 3 or 30 days since the first successful payment. Tier 1 usually applies instantly, later upgrades within 10 minutes, and Google says a request can still be refused in rare cases.

Checked against: source 1, source 2, source 3

Which headers report what is left and when it refills?

Anthropic returns anthropic-ratelimit-requests, -tokens, -input-tokens and -output-tokens headers, each with limit, remaining and reset. Reset is an RFC 3339 timestamp for full replenishment, because the limiter is a token bucket that refills continuously. Token counts are rounded to the nearest thousand, and the tokens headers show whichever limit is tightest, workspace or organization.

OpenAI returns x-ratelimit-limit, -remaining and -reset for requests and tokens, plus project-token variants when a project limit applies. Its reset values are durations such as 1s or 6m0s rather than timestamps, so parse them differently from Anthropic's.

The Gemini rate limits and troubleshooting pages read for this post document no quota headers. Google points to the AI Studio rate limit page for live limits, and it notes that daily request quotas reset at midnight Pacific time.

Checked against: source 1, source 2, source 3, source 4

What should a retry loop treat differently?

Every vendor says to honour Retry-After when it is present and back off with jitter when it is not. The traps are the 429s that retrying cannot fix, and the throttles that fire below your per-minute limit.

  • Anthropic, spend cap: a 429 of type rate_limit_error with error_code enforced_spend_limit_reached and no retry-after. Retries fail until access resumes, so stop.
  • Anthropic, ramp limit: error_code ramp_limit_exceeded after a sharp rise, even under ITPM and OTPM. Wait out retry-after, hold a level that succeeds, then climb by at most one step a minute.
  • OpenAI, slow_down: a 429 when traffic rose too fast. Its rule of thumb is to grow by no more than 50% every 15 minutes once past 1 million TPM. A 503 with server_is_overloaded means the model is overloaded instead.
  • OpenAI, general: failed requests count toward the per-minute limit, quota and billing errors are not retryable, and SDK retries should be turned off or counted if you wrap them.
  • Gemini: retry 429 RESOURCE_EXHAUSTED, 408 and 5xx with exponential backoff; do not retry 400, 402 or 403. The Python SDK retries up to four times, starting near 1 second and capping at 60.

Checked against: source 1, source 2, source 3, source 4

How are batch jobs limited on each platform?

Anthropic gives the Message Batches API its own limits shared across all models: requests per minute plus a cap on batch requests waiting in the processing queue. In the Start tier that is 1,000 RPM, 200,000 queued requests and 100,000 per batch. Batches are not subject to ramp limits.

OpenAI caps total input tokens queued per model for Batch API jobs and for background requests with 2h or 8h windows. Tokens count at submission and free up when the job completes, and batch work does not touch synchronous limits.

Gemini batches sit outside interactive limits too: 100 concurrent batch requests, a 2GB input file, 20GB of file storage, and a per-model ceiling on enqueued tokens that rises with the tier.

Checked against: source 1, source 2, source 3

Which differences change the code you write?

Three of them, in my reading. Size max_tokens tightly on OpenAI, since its value can set the TPM charge for a request, while on Anthropic a large value costs no OTPM headroom. Cache stable prompt prefixes on Anthropic, where cache reads drop out of ITPM entirely. And on Gemini, separate workloads into separate projects, since keys inside one project share a single quota. The site's fixes for an OpenAI 429 and a Gemini RESOURCE_EXHAUSTED on the free tier cover the error strings themselves.

Checked against: source 1, source 2, source 3

What else do people ask?

Does a new API key give me a fresh Gemini quota?

No. Google applies Gemini limits per project, not per key, so a second key in the same project draws from the same allowance.

Is every Anthropic 429 a rate limit?

No. The monthly spend cap also returns 429 with rate_limit_error, but with error_code enforced_spend_limit_reached and no retry-after header.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. This page compares the rate limit documents of OpenAI, Anthropic and Google, all fetched on 20 Nov 2026. I did not send requests to any of the three APIs for it, so nothing here is a measurement. It does not cover prices, spend cap amounts, per-model limit tables, fine-tuning, realtime or image endpoints, or cloud resellers such as Bedrock or Vertex AI. Found a mistake? Tell me.

Keep reading

Next step

Have a project in mind?

Tell me about it. A discovery call within 48 hours.