# Rate limit

> A rate limit is the maximum number of API requests accepted per second (or minute) per key; above it the API answers 429 with a Retry-After header, and batch endpoints are the way to send volume.

A rate limit caps how many requests one credential may make in a period, usually a second or a minute. It protects the platform from runaway loops and each account from the side effects of someone else's bug. Implementations vary: fixed windows count requests per clock interval, sliding windows look back over a moving one, and token buckets allow short bursts while holding the average. The status code for "too many" is 429; a well-behaved API says how long to wait in a `Retry-After` header and exposes the remaining budget in response headers, so that clients can slow down before they hit the limit.

Rate limits are about requests, not messages. One request carrying a thousand messages counts once, which is why volume belongs in [batch calls](https://smsmeteor.io/glossary/batch-endpoint) rather than in many parallel single sends. Nor is the API limit the same thing as [throughput](https://smsmeteor.io/glossary/throughput), the pace at which carriers deliver, or pacing, the speed you choose for a campaign.

## Example

A hypothetical sign-up service sends each code in its own request. During a promotion, sign-ups spike and the service starts receiving 429 responses. The fix is not more keys or more threads: codes go through a small queue that honours `Retry-After`, and the newsletter that was going out at the same moment moves to batch requests.

## Common mistakes

- Retrying a 429 immediately, in a tight loop, which keeps the client over the limit.

- Ignoring the remaining-budget header until requests start failing.

- Treating a 429 as a failed message; nothing was sent, and a later retry with the same [idempotency key](https://smsmeteor.io/glossary/idempotency-key) is safe.

- Spreading traffic across extra keys to dodge the limit instead of batching.

At SMSMeteor: the limit is 50 requests per second per key, and a batch of up to 1,000 messages counts as one request. Responses carry `X-RateLimit-Limit` and `X-RateLimit-Remaining`, and a 429 carries `Retry-After`. Because the limit is per key, one key per system also stops a runaway job in one integration from using up the budget of another.

Related terms: [Batch endpoint](https://smsmeteor.io/glossary/batch-endpoint), [Exponential backoff](https://smsmeteor.io/glossary/exponential-backoff), [Throughput (TPS)](https://smsmeteor.io/glossary/throughput)

---
Source: https://smsmeteor.io/glossary/rate-limit (HTML). Generated by SMSMeteor from the same data as the page. Summary of the whole site: https://smsmeteor.io/llms.txt
