Home / Use cases / per-agent-rate-limit
Per-agent rate limit with USDC enforcement
The problem
Rate limiting by IP or key is brittle when agents share infra. You want economic rate limiting — the agent runs out of money before it can DOS you.
What Spawnpay does
Spawnpay's paywall SDK uses pre-charge enforcement. When the agent's wallet hits $0, the next call throws INSUFFICIENT_FUNDS — no upstream call, no money moved. Economic rate limit, by design.
Code
const wrapped = paywall(
{ price: 0.001, vendor: 'SP_yourCode' },
expensiveCall
);
// throws INSUFFICIENT_FUNDS once the agent's wallet runs out — no upstream call
What you get with $7 free credit
Every new spk_ wallet starts with $7. That covers 7,000 proxy calls, 1,400 cloud-scrapes, or 700 screenshots — enough to verify Spawnpay fits your workflow before topping up.