In plain words
A rate limit caps how many requests one user or IP address can make per minute, so a single caller can't flood your app or run up your bills.
Where you see it
Quill has a "Summarise this note" button that calls OpenAI. Someone scripts it to run 50,000 times overnight, and the bill arrives before you notice. Signup forms that send email through Resend get abused the same way.
What goes wrong
- No limit on routes that cost money
AI calls, text messages and emails are billed per request. Without a cap, one script can spend a month's budget overnight.
- Limiting only in the browser
Disabling the button for ten seconds stops honest double-clicks, not a script that calls your API directly.
- Counting in memory on serverless hosting
On Vercel, requests can land on different short-lived instances, so a counter kept in a variable keeps resetting. Store counts somewhere shared, like Redis.
const hits = new Map(); // empty again on every new instance
What to tell your agent
Quick check
Sign in to earn +10 XP for itYour rate limit lives in a variable inside a Vercel function and doesn't seem to work. Why?