# Rate limits

> Per-key and per-agency budgets, the RateLimit headers and 429.

Each call costs units — most cost 1; heavier ones (planning several days, uploads) cost more, as each [reference](https://api.bymundi.com/docs/reference.md) page says. The budgets, per 60-second window:

| Budget | Units per minute |
|---|---|
| Per key | 120 |
| Per agency (all its keys together) | 600 |

Every response carries the IETF RateLimit headers for the tighter of the two:

```http
RateLimit-Policy: "key";q=120;w=60
RateLimit: "key";r=87;t=34
```

`r` is what is left, `t` the seconds until the window resets. When a budget runs out the API answers [`429 rate_limited`](https://api.bymundi.com/problems/rate_limited.md) with `Retry-After` in seconds. Wait that long, then retry.
