Resources / Guides
API rate limiting and quotas: protect your API and your budget
How rate limits and daily quotas work, per-client vs global limits, the right HTTP headers, and how to stop one caller draining your budget.
Every public API — and every MCP server an agent can call in a loop — needs limits. Without them one buggy client, scraper or runaway agent can take you down or run up your bill.
Rate limits vs quotas
- A rate limit caps bursts: "60 requests per minute".
- A quota caps volume: "1,000 requests per day".
Most APIs need both.
Per client, not just global
A global limit protects your infrastructure but lets one caller starve everyone else. Count per client — per API key when callers authenticate, per IP otherwise.
Answer politely
When a limit is hit, return 429 Too Many Requests with a Retry-After header, and expose RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset so well-behaved clients slow down on their own.
Enforce before your code runs
Limits checked inside your function still cost a function run per rejected call. Enforcing them at the platform edge is cheaper and safer.
In Wisp
Project settings set a per-minute rate and a daily quota for the whole project and per endpoint, counted over all callers or per client. Limits apply immediately, before any code runs, and calls answer 429 with standard headers.
Build it with Wisp — describe an API, get it live.