> ## Documentation Index
> Fetch the complete documentation index at: https://spotzee.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Rate limits

> Per-IP rate limits at the edge for the Spotzee API, the 429 envelope, and what's rolling out next.

The Spotzee API enforces per-source-IP rate limits at the edge today. Two rules apply across `apix.spotzee.com`.

| Rule | Surface | Limit | Action | Block duration |
| - | - | - | - | - |
| Client API limit | `/api/client/*` | 8,000 requests per minute per IP | Block (HTTP 429) | 120 seconds |
| General API limit | `/api/*` (covers `/api/client/*`, `/api/admin/*`, `/api/ext/*`) | 4,000 requests per 10 seconds per IP | Block (HTTP 429) | 10 seconds |

Requests to `/api/client/*` count towards both limits. Either rule can block an IP, depending on its traffic. Both rules count matching requests from each source IP, authenticated or not.

## Response on a block

Over-limit requests receive `429 Too Many Requests` with this JSON body:

```http theme={null}
HTTP/1.1 429 Too Many Requests
```

```json theme={null}
{
  "status": "error",
  "code": "rate_limited",
  "title": "Rate limit exceeded",
  "message": "Rate limit exceeded. Slow down and retry after the period in `Retry-After`.",
  "type": "https://docs.spotzee.com/main-api/errors#rate_limited"
}
```

## Retry strategy

**1. Honour Retry-After when present**

If the response includes `Retry-After`, wait at least that long before retrying. Otherwise, use exponential backoff. Another request can still receive `429` while a block remains active.

**2. Add jitter when fanning out**

If you're driving many requests in parallel from a single host, add 0–500 ms of jitter on top of your delay so retries don't synchronise.

**3. Back off on repeats**

If you see a second `429`, honour `Retry-After` when present. Otherwise, double your delay (exponential backoff) up to a sensible cap, for example 60 seconds.

**4. Cap concurrency per IP**

Both limits count by source IP. Outbound traffic from a single host is the one to pace.

## Self-throttling example

```javascript theme={null}
async function readApi(path, token) {
  for (let attempt = 0; attempt < 3; attempt++) {
    const response = await fetch(`https://apix.spotzee.com/api/client${path}`, {
      headers: { Authorization: `Bearer ${token}` }
    })
    if (response.status !== 429 || attempt === 2) return response
    const header = response.headers.get('Retry-After')
    const seconds = Number(header)
    const wait = header && Number.isFinite(seconds)
      ? seconds * 1000
      : Date.parse(header ?? '') - Date.now()
    const delay = Number.isFinite(wait) ? Math.max(0, wait) : 1000 * 2 ** attempt
    await new Promise(resolve => setTimeout(resolve, delay + Math.random() * 500))
  }
}
```

## Quota-metered endpoints

The Extended API meters certain operations separately from request rate limits. Insufficient credits can return `402` even when request capacity remains available. Check your balance in the Spotzee app before high-volume runs; no public Quota endpoint appears in the generated Extended API reference.

## Rolling out

Per-key read/write budgets, `X-RateLimit-*` headers and a doubled MCP budget depend on rollout availability. Do not use them to exceed the per-IP limits or assume that setting a client-type header grants extra capacity. The self-throttling pattern (honour `Retry-After` when present, add jitter, exponential backoff) works against either layer.

## Next steps

> [card] [Idempotency](https://spotzee.com/docs/guides/api-idempotency.md)
>
> Make retries safe.

> [card] [Errors](https://spotzee.com/docs/main-api/errors.md)
>
> Status codes and the `code` catalogue.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.