Your app worked fine with a handful of test prompts. Then you pointed it at a real workload, sent a few hundred requests in a row, and many came back with an error saying “Too Many Requests.” Your code and your key are fine. You ran into a rate limit.
A rate limit is a provider’s cap on how much your account can send to its AI API within a stretch of time, counted in requests, in tokens (the units providers use to measure text going into and out of a model), or both. OpenAI describes its rate limits as restrictions on how many times a user or client can access its services within a specified period [1]. API requests and answers travel over HTTP, the set of rules the web uses to send messages between programs, and every response carries a status code: a three-digit number saying how the request went [2]. Go over the cap and the extra requests are refused, typically with status code 429, until capacity frees up [3, 1]. A rate limit is mainly about pace rather than your total bill: a spending limit caps what you pay over a month, and the two are separate controls, even though some providers report both with a 429 [4, 5]. If you’re new to how apps talk to models, start with what an AI API is.
TL;DR
- A rate limit caps how fast you can use an AI API: requests and tokens per minute or per day, and sometimes how many requests can run at once [1, 6, 7].
- Limits differ by provider, model and account; OpenAI, Google and Anthropic each raise them automatically as an account builds payment or usage history [1, 6, 5].
- Hitting one returns a 429 “Too Many Requests” response, often with a Retry-After value saying how long to wait [3, 1, 5].
- The same 429 can also mean you’ve run out of credit or hit a spending cap, which waiting won’t fix, so read the error code in the response body [4, 5].
- To stay under a limit, pace and queue requests, ramp up gradually, use batch processing for work that can wait, cache repeated input and keep requests lean [1, 8, 5].
- When you hit one anyway, back off: wait, wait longer after each failure and add a little randomness [1, 9, 10].
Terms used in this guide
- Window: the stretch of time a limit is measured over, such as a minute or a day.
- Rate limit: a cap on how many requests or tokens you can send per window.
- Usage cap, quota or spending limit: a cap on total use or total money over a longer period, such as a month. Providers use these words differently, so this guide gives each provider’s own term.
- 429: the HTTP status code reserved for “too many requests in a given amount of time” [3].
- Retry-After: a response header, one of the named fields a server sends back alongside the answer, telling the client how long to wait, as seconds or as a date [2].
- Backoff: waiting before trying again, and waiting longer after each failed attempt [1].
Token billing is covered in how AI API pricing works.
Why providers limit traffic
OpenAI names three reasons: protecting the API from abuse, such as someone flooding it to cause disruption; keeping access fair so one heavy user doesn’t slow everyone else; and managing the total load on its servers [1]. Google says its Gemini API limits keep usage fair, protect against abuse and maintain performance for all users [6]. Anthropic says its limits aim to prevent abuse while having little effect on common usage patterns [5].
The numbers on a limits page are ceilings, not promised capacity. Anthropic says its limits represent maximum allowed usage rather than minimums, and Google says actual capacity may vary from its specified limits [5, 6]. Leave some margin.
What gets counted
Your traffic is checked against every limit at once, and whichever runs out first stops you. OpenAI’s example: with a limit of 20 requests per minute, 20 tiny requests fill it even if you’re far below your tokens-per-minute limit [1]. Google makes the same point: with a 20-request limit, the 21st request in a minute fails even if no other limit is close [6].
Here is what four providers list on their documentation pages as of November 22, 2026 [1, 6, 5, 11]. These are examples, not endorsements.
| Provider (example) | Units it documents | Notes from its page |
|---|---|---|
| OpenAI | Requests and tokens per minute and per day; images per minute; audio minutes per minute for some streaming audio models | Whichever limit is reached first applies [1] |
| Google (Gemini API) | Usually requests per minute, input tokens per minute and requests per day | Daily request quotas reset at midnight Pacific time; some models add other limits [6] |
| Anthropic | Requests, input tokens and output tokens per minute, per model class | Input and output tokens are limited separately [5] |
| Mistral | Tokens per minute and requests per second per model; tokens per month | Values appear in the account’s admin panel, not the public page [11, 7] |
Some limits count simultaneous work instead of a rate. Mistral describes its requests-per-second limit as “maximum concurrent API requests,” and Google’s Gemini Batch API allows 100 concurrent batch requests [7, 6]. Mistral also lists tokens per month as an overall consumption cap, a reminder that the line between a rate limit and a usage cap can blur [7].
“Per minute” doesn’t always mean per minute
A per-minute limit may be enforced over shorter slices. Anthropic’s example is that 60 requests per minute might be enforced as one request per second, so a quick burst can trip it even when the minute’s total looks fine [5]. Anthropic also says capacity refills continuously up to your maximum rather than resetting at fixed times [5].
Two providers also limit how fast traffic grows. OpenAI can return a 429 with the code slow_down when your request rate climbs too quickly, even within your per-minute limits; its rule of thumb, once traffic reaches 1 million input tokens per minute, is to grow by no more than 50% every 15 minutes [1, 4]. Anthropic’s ramp limits work similarly: after a sharp increase, or a burst within seconds, requests can get a 429 below the rate limit, so it advises starting bulk jobs slowly and spreading requests evenly [5].
Why your limits differ from someone else’s
Usage tiers
Providers sort accounts into usage tiers, and higher tiers get higher limits. As listed on the providers’ pages on November 22, 2026 [1, 6, 5]:
- OpenAI: a Free tier in supported countries, then paid tiers called Build, Launch and Grow, reached automatically once total credit purchases hit $5, $100 and $500 [1]. Its standard table lists Build-tier models at 5,000 requests per minute and 1 million or 2 million tokens per minute depending on the model; Grow-tier figures reach 15,000 to 30,000 requests per minute [1].
- Google: a Free tier, then Tier 1 once an active billing account is linked, Tier 2 after $100 paid and 3 days since the first successful payment, and Tier 3 after $1,000 and 30 days, applied automatically, although Google says an upgrade can in rare cases be denied [6]. Tiers 2 and 3 count total Google Cloud spending on the linked billing account, not only Gemini API use [6].
- Anthropic: organizations are placed on a tier automatically based on usage history and account standing, and new ones may start in a lower Evaluation tier [5]. Its Start tier lists 1,000 to 4,000 requests per minute depending on the model [5].
Limits also vary by model, and Google says experimental and preview models get tighter ones [1, 6]. The figures that count are on your own account’s limits page, which each of these providers and Mistral point to [1, 6, 5, 11]. Rate limits are also worth comparing when choosing a model for a simple app.
You can ask for more, without a promise. Google offers a request form for paid tiers and says it can’t guarantee increases; Anthropic has a “Request tier increase” option; Mistral asks customers to contact support with their target requests per second and expected token use [6, 5, 11].
Who shares a limit
Limits attach to an account, project or workspace, not to a person or a single key. OpenAI sets them at the organization and project level, not the user level [1]. Google applies them per project, not per API key [6]. Anthropic sets them for the organization and lets admins give workspaces lower limits, while the organization-wide limit always applies [5]. Mistral’s Workspace page says its limits apply per Workspace and are shared by every key in it, while its general limits page describes them as the traffic your Organization can send [7, 11].
So a test script, a teammate’s prototype and your live app can all draw on one shared limit if they use the same project, and a new key in that project adds no capacity. Sharing keys has a security cost too; see why an API key needs protecting.
What hitting a limit looks like
The status code comes from the web’s standards. RFC 6585, an IETF standard from 2012, defines 429 Too Many Requests as the user having sent too many requests in a given amount of time, says the response may include a Retry-After header, and leaves it to each server to decide how it counts [3]. RFC 9110 defines Retry-After as either a number of seconds or a date and time [2]. For how status codes fit into a request as a whole, see what happens during a single API request.
Providers add their own detail. OpenAI’s responses can include headers giving your request and token limits, how many remain and when each resets, plus a Retry-After value that is the minimum number of seconds to wait after a temporary rate-limit error [1]. Anthropic sends retry-after and headers beginning anthropic-ratelimit- for requests, tokens, input tokens and output tokens, but not every 429 carries retry-after [5].
Illustrative response headers, using the names in OpenAI’s documentation (checked Nov 22, 2026) with made-up values; yours will differ [1]:
Retry-After: 20(wait at least 20 seconds)x-ratelimit-limit-requests: 60(the request limit in effect)x-ratelimit-remaining-requests: 0(none left in this window)x-ratelimit-reset-requests: 20s(time until the request limit fully refills)
Header names differ between providers [1, 5]. An IETF working group is drafting common RateLimit header fields, but as of November 20, 2026 that was still an Internet-Draft, a work in progress rather than a standard [12]. Read your own provider’s response-header documentation; Google’s rate-limit page, for instance, lists no rate-limit headers [6].
Rate limits, quotas and spending limits are different controls
A rate limit clears within seconds or minutes. Other caps don’t, and several of them can also return a 429.
| Control | What it caps | What you see (examples) | Does waiting a minute help? |
|---|---|---|---|
| Rate limit | Requests or tokens per minute or second | OpenAI and Google: a 429 rate-limit error; OpenAI may add Retry-After [1, 13] | Yes, once capacity refills |
| Daily quota | Requests per day | Google (Interactions API error reference): a 429 with quota_exceeded [13] | Not until the daily reset |
| Provider’s monthly cap | Total monthly use allowed for your tier | OpenAI: a 429 with organization_usage_limit_exceeded; Anthropic: a 429 with enforced_spend_limit_reached and no retry-after [4, 5] | No |
| Your own spending limit | Money you chose to allow per month | OpenAI: a 429 with a spend-limit code; Anthropic: a 400 error [4, 5] | No |
| Prepaid credit used up | Your remaining balance | OpenAI: a 429 with credit_balance_exhausted; Google: a 402 Payment Required [4, 13] | No |
OpenAI says retrying billing, spend or quota errors won’t restore access until the credits or limits are updated [4]. Anthropic says retries against its monthly tier cap, including the SDK’s automatic retries, keep failing until access resumes [5]. Google says not to retry a 402 [9, 13].
Google adds a hybrid: spend-based rate limits over a rolling 10-minute window ($10 on Tier 1 and $200 on Tiers 2 and 3, as listed November 22, 2026), which return 429 RESOURCE_EXHAUSTED and depend on billing history and account standing [6]. Unlike the monthly caps above, Google’s advice here is to wait a short period and retry, or to cut back on expensive requests [6].
So on any 429, read the error code or message in the response body, not just the number. Spending controls, and which ones actually stop traffic, belong to avoiding unexpected AI API charges.
How to stay under the limit
Hypothetical example. Imagine a script that runs nightly and asks a model to summarize 500 newsletter articles, one request each, on an account whose limit for that model is 20 requests per minute; all numbers here are invented. Sent at once, the first 20 or so succeed and most of the rest fail. Even at a perfect pace, 500 requests at 20 a minute take at least 25 minutes. Resending every failure immediately makes it worse, because OpenAI notes that unsuccessful requests still count toward the per-minute limit [1]. The token limit can also run out first: at about 2,000 tokens per article, 20 requests a minute would need 40,000 tokens a minute, more than an account with a lower token limit allows [1].
Techniques from providers’ documentation that address these problems:
- Pace and queue. Release work from a queue at a steady rate a little under your limit, not in one burst; Anthropic advises starting bulk jobs at a low rate and spreading requests evenly, and OpenAI advises ramping up gradually [5, 1].
- Batch work that can wait. OpenAI’s Batch API runs groups of requests within a 24-hour completion window, and batch jobs don’t count against standard per-model rate limits, using a separate queued-token limit instead [8]. Google’s and Anthropic’s batch APIs also have their own separate limits [6, 5]. A nightly job nobody reads until morning fits well. Batch pricing is covered in how AI API pricing works.
- Cache repeated input. If every request repeats the same long instructions, caching can help with limits on some providers; Anthropic says its default input-token limits count only uncached tokens [5].
- Keep requests lean. Trim unneeded input. Output-length settings count differently: OpenAI calculates the rate-limit charge from the larger of the output-token setting and the estimated request size, so it advises setting it near the expected response length, while Anthropic says that setting doesn’t affect its output-token limit [1, 5].
- Combine small tasks. If you hit a requests-per-minute limit with tokens to spare, OpenAI suggests putting several tasks into each request [1].
- Ask for more if the need is steady. Request a higher limit, knowing it may not be granted [6].
That list is BuildAIQ editorial guidance assembled from those sources, not any provider’s checklist. We found no independent research on how often small apps hit limits or which technique helps most, so watch your own error rates.
Backoff, in plain words
Even a well-paced app sometimes hits a limit. The usual answer is backoff: wait briefly after a failed request, lengthen the delay after each further failure, and stop at success or a retry limit [1]. Google’s example sequence is 1 second, then 2, 4 and 8 [9]. OpenAI and Google both recommend jitter, a small random extra delay, so many clients don’t retry at the same instant [1, 9]. An AWS engineering essay from 2019, vendor guidance rather than a standard, explains the reasoning: retries add load to a system that may already be struggling, so backoff spreads them out, and jitter stops clients from retrying in lockstep [10].
When a response includes Retry-After, it sets the floor for your first wait: OpenAI says to treat the value as a minimum and add a small random delay, as its documentation stood on November 22, 2026 [1]. Backoff only helps with limits that clear over time; the credit, quota and spending caps in the table above won’t clear by retrying [4, 5].
The rest of safe retrying, such as how many attempts to allow, how to avoid your code and a provider’s library both retrying the same request, and how to keep a repeated request from doing something twice, is covered in what to do when an AI API stops working. Writing request code is covered in your first coded request. This guide doesn’t cover quotas on cloud platforms that resell other companies’ models; check that platform’s own pages.
Practical Takeaways
- Before a big job, look up your actual limits for the exact model on your provider’s account limits page, and note your tier.
- Do the arithmetic: requests divided by the per-minute limit gives the minimum run time; requests times tokens per request shows whether the token limit binds first.
- Limits are shared across a project, organization or workspace; keep test traffic from competing with your live app.
- Send work at a steady pace below the limit, ramp up gradually, and use a batch API for anything that can wait hours.
- On every 429, read the error code: a speed limit clears with time, while a credit, quota or spending cap doesn’t.
- Back off with jitter and honor Retry-After; for retry caps and other safe-retry rules, see the guide on what to do when an API stops working.
Sources
- Rate limits. OpenAI, accessed 2026-11-22.
- HTTP Semantics (RFC 9110). Internet Engineering Task Force (IETF), 2022-06, accessed 2026-11-22.
- Additional HTTP Status Codes (RFC 6585). Internet Engineering Task Force (IETF), 2012-04, accessed 2026-11-22.
- Error codes. OpenAI, accessed 2026-11-22.
- Rate limits. Anthropic, accessed 2026-11-22.
- Rate limits (Gemini API). Google, accessed 2026-11-22.
- Workspace usage and limits. Mistral AI, accessed 2026-11-22.
- Batch API. OpenAI, accessed 2026-11-22.
- Troubleshooting guide (Gemini API). Google, accessed 2026-11-22.
- Timeouts, retries, and backoff with jitter. Amazon Web Services (AWS Builder Center; Amazon Builders' Library), 2019-12-05, accessed 2026-11-22.
- Usage and limits. Mistral AI, accessed 2026-11-22.
- RateLimit header fields for HTTP (draft-ietf-httpapi-ratelimit-headers-12). Internet Engineering Task Force (IETF) HTTPAPI Working Group, 2026-11-20, accessed 2026-11-22.
- API errors (Gemini API). Google, accessed 2026-11-22.
