UsageRail is for small teams that sell an API. You add the MIT-licensed Node.js or Python SDK to your API server, and it checks customer API keys, applies per-customer rate limits and quotas, and counts usage in your own process, without proxying requests. It keeps a local copy of your keys in sync and sends usage totals in batches: every 60 seconds on long-running servers, after responses on Next.js and Cloudflare Workers.
Your customers get a hosted portal where they create and rotate keys, see their usage, pick a plan and buy prepaid credits. They pay through Stripe Checkout, and the money goes to your own Stripe account. If you charge for overage, UsageRail sends each period's usage to Stripe for the customer's renewal invoice. It then checks Stripe's usage total and the finalized invoice against what it sent, and any period that doesn't match shows up in your console. There's no revenue share, and the free plan covers up to $1,000 a month billed through UsageRail.
The SDKs support Express, Hono, Fastify, Next.js, FastAPI, Flask and Django. APIs written in other languages can call an HTTP check endpoint instead, which costs one network round trip per request. In our benchmark of the Node.js SDK, with UsageRail keys, rate limits and an overage plan, the SDK added 14.8 µs per request at p99, with keys and limits already synced, no network calls and framework time not included.
Built with