Guides
Prepaid API gateway
How a prepaid API gateway prevents surprise AI bills
A prepaid API gateway checks available balance before routing a request.
Prepaid vs invoice-based usage
Invoice-based systems may continue serving traffic and bill later. A prepaid gateway stops new requests at zero balance.
What balance protection should include
Balance protection should work with budgets, model allowlists, output caps, and request logs.
- Return 402 before routing
- Do not bill rejections
- Keep an auditable ledger
When prepaid works best
Prepaid gateways are useful for indie builders, SaaS trials, customer-facing agents, and internal tools.
FAQ
Does prepaid mean requests stop immediately at zero?
Yes. New requests should be rejected when balance or budgets are exhausted.
Does prepaid remove the need for logs?
No. Logs explain which requests consumed credits.