Back to Blog

How to find out which accounts burned your AI credits

After a bill spike, use simple queries by day and by account to see which users burned AI credits, what it cost and which fixes won't hold.

Say you run an AI app that summarizes sales calls. You have 130 customers at $40 a month, so $5,200 comes in. New signups get 500 free credits. Each credit costs you $0.004 in model fees, which makes a fully used grant $2. Your model bill usually lands around $900.

At 6:52 a.m. on the 1st, your phone shows an email from your model provider. A charge of $4,740 has failed on the company card, which has a $4,000 limit. You read the number twice, because last month's was $900.

Your customers renew through the month, but the provider bills on the 1st for usage that's already happened. At 8:05 a.m., before you've sorted out the payment, API access is paused until the invoice clears. Every summary in your product starts failing. At 8:40 a.m. a customer writes: "All of this morning's call summaries failed. We have a pipeline review at 10. What's going on?"

You get the money across and access comes back at 9:31 a.m., 86 minutes later. Six customers ask for that month back. Then you sit down and add it up.

Extra model spend:   $4,740 - $900      = $3,840
Refunds:             6 customers x $40  = $240
Total damage:        $3,840 + $240      = $4,080
Share of revenue:    $4,080 / $5,200    = 78%

There was $6,300 in the bank last night. After the invoice there's $1,560, and a $2,800 contractor invoice is due on the 5th. That's $1,240 you don't have until more renewals land, so today you may also be asking someone who did good work to wait.

None of it comes back. The model has already run and the provider has already billed you for it. You can wipe every suspicious balance this morning and you'll still owe the $3,840, which is the full monthly payment from 96 of your 130 customers ($3,840 / $40), before hosting and before you pay yourself.

So now you have to decide. You can shut off the free credits that brought in nearly every customer you have, or leave them on and risk another morning like this on the 1st of next month. You can't make that call until you know which users burned AI credits, and all you've got is a usage table.

That was a scenario. This wasn't:

From our early beta

A team in our early beta woke up to a $6,000 OpenAI bill. Someone had created hundreds of free accounts and used up the complimentary AI credits on every one of them.

Why AI credit bills arrive before anyone notices

A credit looks like a number in your database, but it's really a promise to pay your model provider the moment someone uses it. Your revenue arrives once a month, per customer, while the cost arrives per call, so every free grant is cash you've committed in advance to whoever opens an account. That's why AI apps get hit by credit farming first.

The obvious move is to sort accounts by spend and ban whoever's on top. Try it and you'll be looking at your best customers. A farmed account stops at 500 credits, because that's all it was given, and anyone paying you $40 a month uses more than that. The money is further down the list, spread across thousands of accounts that each look small. So this investigation goes by day first and by account second.

How to find which users burned your AI credits

These queries are for PostgreSQL. They assume a usage_events table with one row per model call, and an accounts table with each account's plan and signup time. If you don't store cost per call, multiply credits by your cost per credit. Here's the morning in our scenario.

9:45 amFree grants paused10:00 amLogs exported10:15 amSpike starts on the 19th10:40 amFree plan is 89% of bill11:10 am1,980 used all 500NoonList saved, not deleted
9:45 amFree grants paused10:00 amLogs exported10:15 amSpike starts on the 19th10:40 amFree plan is 89% of bill11:10 am1,980 used all 500NoonList saved, not deleted

Stop the spend, then save the evidence. Pause new free grants with a flag and leave paying customers alone. Then put a hard cap on free usage. Export the month's usage rows and the provider's usage report before they age out.

Find the day it started.

spend_by_day.sql
select created_at::date as day,
       sum(cost_usd) as spend
from usage_events
where created_at >= :month_start and created_at < :month_end
group by 1
order by 1;

Compare the total with the invoice. If they're far apart, something is calling the model without logging it, so look at your API keys first. In the scenario they match. The first 18 days ran at $30 a day, which is $540, so the last 12 days cost $4,200 ($4,740 - $540).

Split the bill by plan.

spend_by_plan.sql
select a.plan,
       count(distinct a.id) as accounts,
       sum(u.cost_usd) as spend
from usage_events u
join accounts a on a.id = u.account_id
where u.created_at >= :month_start and u.created_at < :month_end
group by a.plan;
PlanAccountsModel spendShare of billRevenue
Paid130$52211%$5,200
Free2,510$4,21889%$0

The people paying you cost $522 to serve. The people paying you nothing cost eight times as much.

Count free accounts by how much of the grant they used.

grant_use.sql
with free_use as (
  select a.id, a.created_at as signed_up, sum(u.credits) as credits
  from accounts a
  join usage_events u on u.account_id = a.id
  where a.plan = 'free'
    and u.created_at >= :month_start and u.created_at < :month_end
  group by a.id, a.created_at
)
select signed_up::date as signup_day,
       count(*) as accounts,
       count(*) filter (where credits >= 500) as used_it_all
from free_use
group by 1
order by 1;

Real free users trail off. Draw the same accounts by hundreds of credits used and a drained grant shows up as one tall bar at the limit.

Free accounts by credits used, illustrative0500100015002000Under 100100s200s300s400sAll 500AccountsCredits used
Free accounts by credits used,illustrative010002000Under100200s400sAccountsCredits used

Those 1,980 accounts used 990,000 of your 1,054,500 free credits, about 94%.

Check that the list explains the money. About two accounts a day normally use a full grant, so a 30-day month should have 60. That leaves 1,980 - 60 = 1,920 extra accounts, and 1,920 x 500 credits x $0.004 = $3,840. Real data won't line up this neatly. If you're within about 10%, you've found where the money went.

Save the list and mark it, without deleting anything. Any remaining balances can be taken back carefully. By your own normal rate about 60 of these accounts are real people who liked the product, and this table can't tell you which 60.

Where the log stops

Your usage table tells you which accounts spent the money. It can't tell you whether 1,920 accounts belong to 1,920 people or to three.

Keep the first and last queries running every morning, and alert when free spend passes twice its usual day. In this scenario, that alert fires on the 19th with about $320 of extra spend behind it, instead of $3,840 on the 1st.

The usual fixes for free credit abuse, and how each one breaks

These are what everyone tries next, and each one does catch something.

Email rules

Email verification proves someone can open an inbox, so it clears out typos and made-up addresses. It says nothing about whether they've been here before, and it costs you the people whose code lands in spam. Unique emails refuse the same address twice and almost never hurt anyone, but any new address passes. Disposable-domain blocks catch known throwaway services, miss new domains and ordinary mailboxes, turn away people who use privacy forwarding, and leave you with a list someone has to update for good.

Gmail ignores dots, and mail to name+anything@gmail.com reaches the same inbox, so one inbox can look like many addresses. A rule for that needs upkeep, and it does nothing about a second real mailbox.

Hurdles at signup

CAPTCHA stops many simple scripts. Some automation still gets through, someone signing up by hand barely slows down, and people on screen readers or old phones struggle with it. You pay in fees and lost signups. A phone number or card requirement stops casual second accounts. Anyone with another number or card carries on, students and people who wanted to try first leave, and every text is another charge.

Network rules

One account per IP address catches repeat signups on one connection and misses every other network. Offices, campuses and households share addresses, so expect tickets. VPN blocks catch the ranges on your list and land on privacy-minded people and staff on company VPNs. That's a second list to maintain.

Limits inside the product

Rate limits stop bursts from one account, and usage caps stop one account overrunning. Keep both, and expect to tune them so they don't slow real users in a busy hour. But neither was built for this. All 1,920 accounts stayed inside their cap, so your 500-credit limit worked every single time, and it still cost you $3,840.

Smaller grants and shorter trials lower the cost per account and take value from every honest user. Cut the grant to 100 credits and the same 960,000 credits simply takes 9,600 accounts.

Reviewing accounts by hand

A person can spot things a rule can't. At one minute per account, 1,980 accounts is 33 hours, the money's already gone by then, and a tired reviewer tends to block whoever looks odd.

Put it all together and your signup form has a puzzle, a phone step and a card field. The honest people feel every step, and the upkeep is a second job.

Evaluate the claim before the credits go out

Your usage table explains where the money went. AbuseZero is built for the moment before that, when a new account asks for its credits. The email rules, the IP limits and the hurdles above each look at one thing. You get multi-layer AI risk analysis that examines 140,000+ signals, detects linked claims and flags abuse that single checks miss, and signals are read together, never one at a time. There's also a proprietary algorithm, with AI that checks the claim again. AbuseZero checks mailbox aliases, disposable domains and mail routing, and sees beyond an IP address with VPN, hosting, network reputation, Tor and proxy intelligence. It recognizes repeat devices across new accounts, even when email addresses keep changing. Creating a fresh account isn't enough to erase previous activity. You don't have to build your own abuse prevention system.

Your server makes one API call before each grant and gets a clear allow or deny, under rules you control. Observe mode shows you what would be denied before anyone is blocked, and the quickstart protects your first benefit. Your app still grants the credits and enforces its caps.

Frequently asked questions

How do I see which users used the most AI credits?

Sum credits by account for the billing period and sort it. Those are usually paying customers. For free grants, count accounts by how much of the grant they used.

Is every account that used all its credits abusing the free plan?

No. Some people just like the product, and your free allowance should leave room for them. Compare the count with your normal rate.

How do I stop this happening next month?

Pause and cap first, then evaluate each claim before you grant credits. AbuseZero's evaluation returns allow or deny.

Before the next batch of credits goes out

Keep reading

Copying your prompt…

Copied the to your clipboard. Give it to your coding agent & it will handle the rest.