Rate Limits
The Levelcast API enforces per-minute rate limits (sliding 60-second window, keyed by client IP plus API key/session when available). There are no per-plan tiers and no daily quotas — billing limits (patients, rules, keys) are separate per-account quotas, see Billing & Plans.
Limits
| Bucket | Applies to | Requests/minute |
|---|---|---|
| Global | Every request | 1,000 |
| Public API | /api/v1/public/* (API keys) | 300 |
| Ingress | LibreLinkUp/Nightscout fetch | 120 |
| Auth | /api/auth/* (login attempts) | 30 |
| AI | /api/v1/ai/* (transcription) | 20 |
The global bucket applies on top of the per-feature bucket.
Self-hosting behind a proxy? Set
TRUST_PROXY=true(or forwardcf-connecting-ip/x-real-ip) so limits are keyed by the real client IP. With an unknown IP the limiter skips enforcement and logs a warning.
Exceeded limit response
HTTP/1.1 429 Too Many RequestsRetry-After: 12{ "success": false, "error": "rate_limited", "message": "Too many requests"}Only the Retry-After header (seconds until the oldest request leaves the window) is returned. When Redis (REDIS_URL) is configured the buckets are shared across instances; otherwise they are per-instance in memory.