Back to Blog

How to limit free API keys per developer

Free keys can eat the capacity paying customers rely on. How to limit free API keys per user, which exceptions to allow and where basic checks break.

1 free key, at 60 requests a minute     =    60 requests a minute
20 free keys on one account             = 1,200 requests a minute
3 developers doing the same             = 3,600 requests a minute
Your paying customers at peak           = 1,900 requests a minute
Everything arriving at 9:00 a.m.        = 5,500 requests a minute
What your servers can handle            = 4,000 requests a minute
Requests with nowhere to go             = 1,500 every minute

Nothing here happened to a real company, and your own figures will differ. Line three is where it turns. Three people who pay you nothing are sending almost twice what your whole customer base sends, and every one of their 60 keys is inside its limit, so your gateway hasn't said a word.

Your servers can't tell who's free once the load goes over. If 1,500 of every 5,500 requests fail, that's 27%, and paying traffic fails at the same rate as the rest. That comes to about 518 failed requests a minute from the people who pay you (1,900 × 1,500 ÷ 5,500), or about 31,000 across a one-hour peak.

It's 9:47 a.m. on a Tuesday when your biggest account, on your $499 plan, writes in: "About one in four of our calls has timed out since 9. Our own customers can see it. Are you down?"

You aren't down. Your status page is green and the graphs show full servers and nothing broken. You sort traffic by key and the top of the list is your paying customers, which looks fine. It's 10:30 before you think to group by plan. Sixty free keys, each sitting at exactly 60 requests a minute, are 65% of your traffic (3,600 ÷ 5,500). They belong to three accounts. That's the morning you start searching for how to limit free API keys per user.

By noon, three customers on the $499 plan have asked for this month back, which is $1,497. One of them asks whether you publish an uptime commitment, and people only ask that once they've started comparing. If they go, that's $5,988 a year.

You could buy your way out. Say a server handles 500 requests a minute and costs $410 a month. Clearing 1,500 takes three servers, so $1,230 a month and $14,760 a year. If your company spends $20,000 a month, that's about 22 days of runway a year, spent so three people can keep not paying you.

Then someone on the team says what you've been avoiding: cut the free tier, from 60 requests a minute to 10. Your homepage says 60. That number is how most of the customers now timing out found you. At 10, the side project someone built on your API last spring starts getting errors, and they won't email you about it. They'll just move it. As for the three people who caused this, 3,600 ÷ 10 = 360 keys, and keys are free.

Why a limit on API keys stops at the account

So that afternoon you cap free accounts at a few keys and revoke the rest. For three weeks the graphs are calm. Then the timeouts come back, and this time the list shows 60 accounts with one key each, all created in the last nine days. It's the same 3,600.

You wanted a limit per user. What your database can count is keys per account, and a new account starts at zero. Say an account takes two minutes to open. Twenty of them is a 40-minute job, done once, for 1,200 requests a minute that never expire. Some of these people are building something real on a budget of $0, and some are reselling your API. Your capacity graph looks the same either way.

Rate limits don't reach this, because they count inside one key or account. A per-account cap is still worth building, since it closes the easiest path.

How to limit free API keys per user

These five rules are about an afternoon's work.

Don't issue a key at signup. Issue the first one when someone asks for it, after they've confirmed their email. Accounts that sign up and leave then cost you nothing.

Allow about three active keys. That covers production, development and a spare for rotation.

Put the quota on the account, never on the key. Every key draws from the same 60 requests a minute. Those three accounts would have had 180 between them (3 × 60), down from 3,600. Decide early whether that limit sits on the user or the workspace.

Count and create in one transaction. Lock the account row while you count active keys and insert the new one, or two tabs clicking at once can both get under the limit. Store only the key's hash, and show the key once.

Give all free traffic its own pool. Cap it at, say, 800 requests a minute, apart from paying traffic. Now 800 + 1,900 = 2,700, well under your 4,000, so a bad morning on the free tier can't reach your customers. If 3,600 requests from those developers and 300 from honest ones fight over 800 slots, about one free request in five gets through (800 ÷ 3,900).

Here's the whole flow, including the part these rules can't touch:

Create a free keyKeys on this account?2 of 3 usedKey shown onceCreate a fourth keyKeys on this account?3 of 3 usedLimit reached, see plansNew account, first keyKeys on this account?None yetKey shown onceDeveloperYour serverYour key tableDeveloperYour serverYour key table
Create afree keyKeys onthisaccount?2 of 3 usedKey shownonceCreate afourth keyKeys onthisaccount?3 of 3 usedLimitreached,see plansNewaccount,first keyKeys onthisaccount?None yetKey shownonceDeveloperYourserverYour keytableDeveloperYourserverYour keytable

Which exceptions to allow on free API keys

A limit with no exceptions sends your best free developers to support, or to a second account. Most people asking for more keys are honest, so decide the answers before the tickets arrive.

YesNoYesNoYesNoYesNoDeveloper asks foranother free keyReplacing aleaked key?Revoke the old keyIssue one new keySame project,new environment?Named keySame shared quotaCoworker onthe same project?Invite to the teamSame shared quotaHackathon, courseor open source?Extra quotawith an end dateOffer a paid planand a way to reach you
YesNoYesNoYesNoYesNoDeveloper asks foranother free keyReplacing aleaked key?Revoke the old keyIssue one new keySame project,new environment?Named keySame shared quotaCoworker onthe same project?Invite to the teamSame shared quotaHackathon, courseor open source?Extra quotawith an end dateOffer a paid planand a way to reach you

Because the quota lives on the account, the first three answers add no load. Two hundred developers at a 48-hour hackathon is great for you, as long as the end date is stored in your database and nobody has to remember it. An agency asking for six free tiers for six clients is a sales conversation. A developer with a work account and a personal one hasn't done anything wrong, so write down what you allow before you enforce it.

The basic checks past the account limit, and how they break

To go further you have to decide that two accounts are one developer. Most teams start with email. Gmail ignores dots in personal addresses, so sam.lee@gmail.com and samlee@gmail.com are one inbox, and mail to sam+api@gmail.com reaches it too. A rule for that needs upkeep of its own.

Basic checkCatchesMissesWrongly blocksCost to keep working
Email verificationTypos, dead addressesAny second real inboxDevelopers whose code lands in spamDeliverability work
Unique emailsThe same address twiceEvery different addressAlmost nobodyVery little
Disposable-domain blocksKnown throwaway servicesNew domains, ordinary mailboxesPeople using privacy forwardingA list updated forever
Dot and plus address rulesOne inbox written several waysA second real mailboxPeople who sort their mail with plus addressesUpkeep as mail services change
CAPTCHASimple scripts20 accounts opened by handPeople using screen readersFees, lost signups
Phone or card requirementCasual second accountsAnother number or cardStudents, hobbyists, patchy phone coverageText charges, fewer signups
One key per IP addressRepeats on one connectionAny other networkHackathons, offices, coworking spacesExceptions and tickets
VPN blocksKnown VPN rangesEverything off your listStaff on company VPNsAnother list
Rate limitsBursts on one key60 accounts under the limitReal users in a busy hourTuning per endpoint
Usage capsOne account overrunningEach new account's fresh capAnyone at the capDeciding when your API stops
Smaller allowance or shorter trialSome cost per accountMore accounts make it upEvery honest developerFewer people reach paying
Manual key approvalWhat a person can spotAnything spread over weeksEveryone stuck waitingHours, slower starts

Each row catches something, so keep the cheap ones. The trouble is your audience. Developers use plus addresses, VPNs and throwaway inboxes for ordinary reasons, so rules aimed at duplicates land hardest on the people your API was built for. Blocking VPNs can shut out a customer's whole engineering team. Manual approval at 200 key requests a day and three minutes each is 600 minutes, or 10 hours of someone's day.

Six months in, you own a domain list, a hackathon allow list and a form that asks honest people for a phone number. Next week the list needs new entries.

Protect your free tier with one API call

Every row above gives you one clue about one account, and the next account doesn't have to leave the same clue. AbuseZero was built for that gap. Put it in front of your first free key. AbuseZero puts 140,000+ signals through multi-layer AI risk analysis, which detects linked claims and flags abuse that single checks miss. Those signals are read together, never one at a time. The domain list you were going to keep updating? AbuseZero checks mailbox aliases, disposable domains and mail routing. The VPN argument? AbuseZero sees beyond an IP address with VPN, hosting, network reputation, Tor and proxy intelligence. And where your key table answered "None yet", AbuseZero recognizes repeat devices across new accounts, even when email addresses keep changing. Creating a fresh account isn't enough to erase previous activity. AbuseZero uses a proprietary algorithm, with AI that checks the claim again.

You make one API call before the free key is issued and get a clear allow or deny, under rules you control. Eligibility can be once per user, or once per calendar month if your free allowance renews. Observe mode shows you what would be denied before anyone is blocked. You don't have to build your own abuse prevention system. Your key table, quotas and free pool stay where they are, and the quickstart protects your first benefit.

Frequently asked questions

Should I limit free API keys per user or per team?

If your product has teams, limit per team with one shared quota. Otherwise a team of five gets five free tiers. See how to stop free tier abuse on an API product.

What should a developer see at the key limit?

Which keys are active, how to revoke one, your paid plans and a way to reach you. Some will have a good reason, so say it fairly.

Can I stop one developer opening several free accounts?

The basics slow it down without stopping it. AbuseZero evaluates the claim when the first free key is requested and returns allow or deny, under the rules you set for honest second accounts.

Keep your free tier for the developers it's for

Keep reading

Copying your prompt…

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