Abuse Prevention and Denial-of-Wallet
Stop free-tier abuse, scraping, jailbreak farming, and attacks designed to run up your bill — with limits, signals, and cheap first-line filters.
A traditional web app that gets hammered slows down. An AI feature that gets hammered keeps working perfectly and sends you the bill. Every request your app forwards to a model costs real money, which makes your AI endpoints a target for a kind of attack that barely mattered before: denial-of-wallet, where the goal isn't to take you offline but to make you pay until you turn the feature off yourself.
Most of it isn't even malicious in the dramatic sense. It's people farming free trials, scripts using your chat box as a free general-purpose model, and the occasional user who pastes a 400-page PDF into every request. In this lesson you'll map the abuse patterns specific to AI features, cap the worst-case cost of every request, add a global spend circuit breaker, stop your feature from becoming someone's free LLM, and build the signals that tell you who's abusing it.
How AI features get abused
Abuse of AI features falls into a handful of patterns. Each has a different motive, so each needs a different defense.
| Pattern | What the abuser wants | What it costs you | First signal |
|---|---|---|---|
| Free-tier farming | Your free credits, many times over, through throwaway accounts | Direct model spend with no revenue | Many new accounts from the same network or device, each using exactly the free quota |
| Proxy abuse | A free general-purpose model, using your feature as the front end | Spend on traffic that has nothing to do with your product | Off-topic inputs, scripted timing, no other product activity |
| Cost amplification | Usually nothing; sometimes just to hurt you | Huge inputs, maximum outputs, long chains of calls | A few users with per-request costs far above the median |
| Output scraping | Your outputs in bulk, for a competing product or a training dataset | Spend, plus your differentiation | High, steady volume across many entities, little interaction with results |
| Jailbreak farming | Disallowed content generated through your account instead of theirs | Spend, plus risk to your provider account and reputation | Refusals, moderation flags, repeated prompt variations |
Only the last row is about harmful content. The rest are economic, and your moderation layer won't see them, because every individual request looks fine. You only see abuse in aggregate: per account, per network, per hour.