AISim › Chapter 5: Advanced

One user, half your bill

Level 22. A few scripted accounts are eating everyone's capacity.

You launched a free tier. Within a week, a handful of accounts started hammering your API from scripts, with huge prompts, hundreds of times a minute. Half your traffic is now them. Real users are getting 429 errors, and your cost per real request has nearly tripled.

Goals

Concepts: Abuse, Per-user limits, Cost control.

Hint

Your provider rate-limits you, but nothing rate-limits your users. How many messages a minute does a real person send?

What you learn

Your provider's rate limits protect them, not you. Anything that's free, or billed per seat while you pay per token, needs per-user limits on requests, on tokens per day and on spend, so a single script can't burn your capacity or your budget. Set them generously for people and tightly for machines.

More in this chapter

This interactive level needs JavaScript. Built by (cybernerdie).