Can one visitor run up your AI bill?
I built a demo app that writes cover letters, with one AI button and no limit. A script pressed it 50,000 times in 33 seconds, which would have cost $3,200.06.
Only check apps you own or have permission to test.
- 110K+
- views on my bank statement reel
- 507
- people sent the free check from a reel comment
- 1,395
- people follow along on Instagram
Counted from Instagram and my DM log.
What I found
The app was mine and its AI answers were canned, so no real money went anywhere. The bill uses Claude's real prices for the model I picked, about 6 cents a press.
$3,200.06
50,000 presses in 33 seconds, no limit
Same script with a simple limit on: 41 answered, and the bill was $2.62.
| Limit | Answered | Bill |
|---|---|---|
| Off | All 50,000 | $3,200.06 |
| On | 41 | $2.62 |
The limit was simple. Five presses saved up, then one more every second, and a "too many requests" answer after that. Same script, and the bill barely moved.
Then I ran the 20-press test below on the same app. Limit off, 20 of 20 went through. Limit on, 4 went through and 16 were refused. I also gave the check to a fresh Claude Code with a plain copy of the app. It found the open AI button, a welcome email anyone could send to any address, and unlimited password guessing on the login, and it changed nothing until I said go.
Why AI-built apps end up like this
When you build with AI, the button works the first time and you move on. Nothing in the build ever asks "what if someone presses this 50,000 times". Every press reaches your AI provider, and you pay for every one.
Check yours in 5 minutes
Run it on a test copy of your app, like a preview or staging deploy, not the live one. You press your button once and the test repeats it 20 times, so it costs what 21 normal uses cost. You need a computer with Chrome or Edge.
- Open your test copy on the page with the AI button. Log in like a normal user if it has logins.
- Press Ctrl + Shift + J (Mac: Cmd + Option + J). Paste the test below and press Enter. If Chrome blocks the paste, type
allow pasting, press Enter, and paste again. - When it says "Ready.", press your AI button once and wait for the answer.
- Type
rateTest()in the console and press Enter. It lists what your button sent. Then typerateTest(1)with the number of your AI call.
// Rate limit test from vaultxsec.com/guides/rate-limit-test/
// Records what this page sends after you press a button. Repeats only the request you pick,
// 20 times, and counts how many went through and how many were refused. Sends nothing to us.
(() => {
let seen = [];
document.addEventListener("click", () => { seen = []; }, true);
const keep = (r) => { if (!/\.(js|css|png|jpe?g|svg|webp|gif|woff2?|ico)(\?|$)/i.test(r.url)) seen.push(r); };
const realFetch = window.fetch;
window.fetch = async function (input, init) {
const req = input instanceof Request ? input.clone() : null;
const t = performance.now();
const res = await realFetch.apply(this, arguments);
keep({ how: "fetch", req, input, init, url: req ? req.url : new URL(String(input), location.href).href,
method: ((init && init.method) || (req && req.method) || "GET").toUpperCase(),
ms: performance.now() - t, status: res.status });
return res;
};
const X = XMLHttpRequest.prototype, open = X.open, send = X.send, setH = X.setRequestHeader;
X.open = function (m, u) { this._rt = { how: "xhr", method: String(m).toUpperCase(), url: new URL(u, location.href).href, headers: {} }; return open.apply(this, arguments); };
X.setRequestHeader = function (k, v) { if (this._rt) this._rt.headers[k] = v; return setH.apply(this, arguments); };
X.send = function (body) {
if (this._rt) { const r = this._rt, t = performance.now(); r.body = body; r.cred = this.withCredentials;
this.addEventListener("loadend", () => { r.ms = performance.now() - t; r.status = this.status; keep(r); }); }
return send.apply(this, arguments);
};
const again = (r) => r.how === "xhr"
? realFetch(r.url, { method: r.method, headers: r.headers, body: r.body, credentials: r.cred ? "include" : "same-origin" })
: r.req ? realFetch(r.req.clone(), r.init) : realFetch(r.input, r.init);
window.rateTest = async (pick) => {
const times = 20;
if (!seen.length) return console.log("Nothing recorded yet. Press your button once on the page, wait for the answer, then type rateTest() again.");
if (!pick) {
const slow = seen.indexOf([...seen].sort((a, b) => b.ms - a.ms)[0]) + 1;
console.table(seen.map((r, i) => ({ number: i + 1, method: r.method, address: r.url.slice(0, 90), seconds: +(r.ms / 1000).toFixed(1), status: r.status })));
return console.log(`Your button sent the requests above. Number ${slow} took longest, which is usually the AI call. Check its address, then type rateTest(${slow}) to repeat it ${times} times. Nothing has been repeated yet.`);
}
const r = seen[pick - 1];
if (!r) return console.log(`There is no number ${pick}. Type rateTest() to see the list.`);
console.log(`Repeating ${times} times: ${r.method} ${r.url}`);
const codes = {}; let next = 0;
const worker = async () => { while (next < times) { next++;
let c; try { c = (await again(r)).status; } catch (e) { c = "failed"; } codes[c] = (codes[c] || 0) + 1; } };
await Promise.all(Array.from({ length: Math.min(5, times) }, worker));
const ok = Object.entries(codes).filter(([c]) => c >= 200 && c < 300).reduce((s, [, n]) => s + n, 0);
const refused = codes[429] || 0;
const other = Object.fromEntries(Object.entries(codes).filter(([c]) => !(c >= 200 && c < 300) && c != 429));
console.log(`Went through: ${ok} Refused (429 Too Many Requests): ${refused} Other: ${JSON.stringify(other)}`);
console.log(refused ? "RESULT: some were refused. Something limits how fast this can be repeated."
: ok === times ? `RESULT: all ${times} went through. Nothing refused them.`
: "RESULT: unclear. Some failed for another reason. See the guide's list for what each number means.");
return codes;
};
console.log("Ready. Now press your AI button once on the page and wait for the answer. Then type rateTest() here and press Enter.");
})();
All 20 went through means nothing stopped a fast burst, and a burst is exactly how the $3,200 happened. A looser or daily limit could still exist, but it's too loose to protect an AI button. Some came back 429 means something does. Then open the app in a private window, not logged in, and try the button. If it works without an account, anyone on the internet can press it.
All 20 went through?
The fix is below and it's usually an hour of work. If you'd rather not, send it to me. I fix one finding from $150, and you get the price in writing before I start.
Get it fixedLet your AI run it, free
For Claude Code, Cursor, Lovable or Bolt
Paste it into the chat that has your app open. It runs the check itself and asks before it changes anything.
No coding tool? Open it in a chat that walks you through each step:
Back from your AI without a result link? Tap what it found:
Make it a free account. Run every free check from inside your AI with no copying, see what an add-on can touch before you install it, and keep your results in one place. Your email is already filled in.
Want to see exactly what your AI is told? Here's the page it reads. Not you?
Your AI runs it on your side. VXSec never sees your code or data, only which check ran, when, and how many holes it found. Use a test copy for checks that change data. Nothing gets fixed until you say yes.
How to fix it
- Limit each visitor. A few presses saved up, one more every second or so, then a 429. Limit by account if people log in, by IP address if they don't.
- Ask for a login before anything that costs you money. An IP limit is easy to dodge with a VPN. An account limit is harder.
- Cap what one press can cost. Limit how much text people can send, and set a maximum reply length. In my test, Claude cut it from 4,096 tokens to 1,500.
- Set a spend limit at your AI provider. It's a safety net, not the fix, because one stranger can still burn the whole month.
If your site runs through Cloudflare, its rate limiting rules can do the first one without touching your code. Then run the 20-press test again.
What still catches people
- A limit only in the page. The page waits, a script doesn't.
- The limit is on the login but not on the AI button.
- The app says "done" even when the AI call failed. Your provider's usage count is the final word.
Questions
Some came back 429. Am I done?
Something stops a fast burst. It doesn't tell you how much one person can send in a day, so set a spend limit too.
I got 401, 403 or 500 instead.
Some services refuse with 403. Some send a one-time code a repeat can't reuse. The test can't tell those apart, so use the AI check.
Can I test someone else's app?
No. This one costs the owner money every press. Only your own.
Before you launch
This is one hole. Launch Gate runs six other checks in one go on a test copy of your app, like who can see whose data, and gives you one page of results with proof. Members get it inside their own AI.
VXSec Membership
$19a month, or $190 a year
- Workspace Setup
- AI Reach Map
- Agent Brakes
- Launch Gate
- Leaver Check
- Every new helper, the day it's out
New members first month $7, then $19 a month. Cancel anytime.
Rather have it done for you? I fix it $150 and up, 20% off for members · Launch Review $297 once, I check and fix the top 3 · Built for you $1,500 a month and up
Want to practise on an app built to be broken first? Open the practice lab.