# Rate limits

> Which calls are limited, what a 429 looks like, and how to back off.

URL: https://renzo-digital.com/docs/concepts/rate-limits

Renzo limits the calls that are easy to abuse: sign-in, a few public lookups, OAuth and MCP. Other calls have no fixed per-client limit today, but send a sensible load: page with `limit=100` rather than many small pages, and cache public reads.

> **Warning:** The values below are today's defaults. **They may change at any time without notice.** Never hard-code them; read `Retry-After` instead.

## Limits

| Calls | Limit | Counted per |
| --- | --- | --- |
| `POST /api/v1/auth/otp/request`<br />`POST /api/v1/users/me/email/request` | 10 in 15 minutes, shared by both calls; and 1 a minute and 5 an hour to one email address, from any IP | IP address and email |
| `POST /api/v1/auth/otp/verify`<br />`POST /api/v1/users/me/email/verify` | 30 in 5 minutes, shared by both calls | IP address |
| Social sign-in: start, callback and verify | Count toward the verify limit above | IP address |
| Social sign-in: a callback that sends a code, and `POST /api/v1/auth/social/email` | Count toward the request limits above | IP address and email |
| `POST /api/v1/auth/password/login` | 20 in 15 minutes, and 5 in 15 minutes per email address | IP address and email |
| `GET /api/v1/referrals/program` | 30 per minute | IP address |
| `GET /api/v1/referrals/codes/{code}` | 30 per minute | IP address |
| OAuth endpoints for AI apps | See [MCP](https://renzo-digital.com/docs/mcp#limits) | IP address, app or grant |
| MCP tool calls | 60 per minute; 1,000 per day with `mcp.full_text`, else 200 | Customer |

## The 429 answer

```http
HTTP/1.1 429 Too Many Requests
Content-Type: application/problem+json
Retry-After: 42
```

```json
{
  "type": "https://errors.renzo.app/rate_limited",
  "title": "Too Many Requests",
  "status": 429,
  "code": "rate_limited",
  "detail": "Too many attempts. Try again later.",
  "instance": "/api/v1/auth/otp/request",
  "correlation_id": "0b6f3c1e8f4a4d2b9a573e2c1d0f9a11",
  "retry_after_seconds": 42
}
```

- `Retry-After` and `retry_after_seconds` hold the same number of seconds.
- Most limits use a sliding window: the count covers the last 15 minutes (or 5, or 1) at any moment, not a fixed clock block.
- If the sign-in limiter itself is down, sign-in calls pause with `503` [`auth_temporarily_unavailable`](https://renzo-digital.com/docs/error-codes#auth_temporarily_unavailable) and `Retry-After: 60`, rather than run without a limit. Password sign-in answers `401` [`invalid_credentials`](https://renzo-digital.com/docs/error-codes#invalid_credentials) in that case.
- MCP limits do not answer `429`. They come back as tool errors, see [MCP](https://renzo-digital.com/docs/mcp#limits).

## How to back off

1. On `429` or `503`, read `Retry-After` and wait at least that many seconds.
2. If there is no `Retry-After`, wait with exponential backoff and jitter: about 1, 2, 4, 8 seconds, plus a random part, up to a few retries.
3. Do not retry in a tight loop. Every retry inside the window counts again.
4. For writes, keep the same `Idempotency-Key` on each retry. See [Idempotency](https://renzo-digital.com/docs/concepts/idempotency).
5. Show a person a clear message when sign-in is limited, such as "Too many attempts. Try again in a few minutes."

```python
import random
import time

import requests

def call_with_backoff(method, url, **kwargs):
    for attempt in range(5):
        answer = requests.request(method, url, **kwargs)
        if answer.status_code not in (429, 503):
            return answer
        wait = answer.headers.get("Retry-After")
        time.sleep(int(wait) if wait else 2**attempt + random.random())
    return answer
```

Limits count by IP address for sign-in. Many users behind one office or mobile network share that budget.
