No spend cap on model calls
What it looks like
// POST /api/chat. Public, no login required.
const { prompt } = await req.json();
const completion = await openai.chat.completions.create({
model: MODEL, messages: [{ role: "user", content: prompt }],
});
// No per-user quota, no rate limit, no budget in the provider console.What happens
A script can hit the route in a loop overnight and the bill lands on your card, or the provider pauses your account mid-day when its own cap trips and every user sees errors.
Where it shows up
Descriptive, not a verdict: builders and stacks whose defaults make this reachable, or that a public incident names. Each hub states the tool's own security features.
Seen in public
Two days after announcing a SaaS built with Cursor and no hand-written code, its founder reported subscription bypasses, maxed-out API keys and unwanted database writes; he shut the app down three days later.
- 2025-03-15 Launch announcement
- 2025-03-17 Report of subscription bypass and API key abuse
- 2025-03-20 Shutdown announcement
Mar 2025 · Leo (Enrichlead founder) · all sources
Check it yourself
Uses your builder's dashboard and your browser. No tools to install.
- Sign in to your model provider's console and open the billing or limits page (OpenAI: Limits; Anthropic: Settings, then Billing). Note whether a monthly spend limit and a spend alert are set.
- In your app, press F12, select the Network tab, and use the AI feature once. Note the request URL your app calls.
- Open a private window where you are logged out and call that URL again with the same payload (right-click the request, Copy as fetch, paste into the console). Repeat a handful of times.
- Bad result: the calls succeed while logged out, or keep succeeding at any speed while logged in, and the provider console has no spend limit set.
What we check
We measure how many model calls one account and one anonymous visitor can make per minute, and estimate the daily cost at that rate from the model's list price. We then check whether your provider-side spend limit would stop it before the card does.
Fix direction
Set a monthly spend limit and alerts in the provider console, and require login for model routes. Add a per-user quota (calls or tokens per day) plus rate limiting (a cap on requests per minute) at the API route. OpenAI and Anthropic both document account-level spend limits.
Mechanism documented in: Production best practices (verified 2026-09-21); Rate limits (verified 2026-09-21).
Covered by
Ready-to-charge check ($390, 48 hours) and Full audit ($1,900, 5 business days)
Both include a re-check after your fixes.
Related patterns
- LLM API key exposed to the clientAI featuresCritical
Anyone who views the page source can copy the key and run their own workloads on your account until the bill or the provider stops them.
- No rate limiting on sensitive routesReliabilityHigh
A script can try thousands of passwords against your login form, hammer a form that sends emails or calls a paid API, or knock the app over, and the bill lands on you.
- Unbounded input length to the modelAI featuresMedium
One oversized paste costs as much as thousands of normal requests, and a burst of them uses up your provider rate limit so real users see errors.
- Third-party API key in the JavaScript bundleSecrets and keysHigh
Anyone who views the page source can take the key and run up charges, send messages or pull data on your account until the key is revoked.
Questions
no spend limit on openai api
OpenAI's production guidance says to set spend alerts and, to enforce a monthly cap, a hard spend limit on the limits page. Anthropic's console has a monthly spend cap per tier and lets you set a lower limit of your own. Neither is on by default at a level you chose, so open the console and set one before launch.
llm rate limit missing
Rate limiting means capping how many requests one user or IP address can make in a window of time. Without it, one client can consume your whole provider allowance and every other user gets errors. Test it by copying the request from developer tools and repeating it quickly; if nothing slows or blocks you, the limit is missing.
can someone spend my api budget
Yes, if your model route accepts anonymous calls or has no per-user quota. The founder of one AI-built SaaS reported maxed-out API key usage two days after launch (Leo (Enrichlead founder), 2025). Login on the route, a daily quota per user and a provider-side spend limit are the three controls to check.
Back to the catalogue, or run the self-check for your stack.