Skip to main content

Rate Limiting

PrismRateLimitMiddleware uses a token bucket algorithm to limit request rates. Clients exceeding the limit receive a 429 Too Many Requests response.

Quick Setup

Basic Rate Limiting
That’s it — 60 requests per minute per client.

Protecting Specific Routes

Apply rate limiting to sensitive endpoints only:
Targeted Rate Limiting
For more advanced rate limiting with sliding windows, per-user limits, and X-RateLimit headers, see Advanced Rate Limiting.

Advanced Rate Limiting

Sliding windows, per-API-key limits, and rate limit headers.