# UsageRail > API monetization platform for small teams: issue API keys, enforce rate limits and quotas, and bill usage through your own Stripe. Free up to $1K a month. UsageRail adds API keys, rate limits, quotas and usage metering to an API through a Node or Python SDK, or an HTTP check from any language, and bills that usage through the seller's own Stripe account. The SDK is open source: https://github.com/usagerail/sdk ## Docs: Get started - [UsageRail docs](https://usagerail.com/docs): Add API keys, rate limits, quotas and usage metering to your API with the Node or Python SDK, or check requests over HTTP from any language. - [UsageRail quickstart: your first metered request](https://usagerail.com/docs/quickstart): Create an app, install the Node SDK, add the Express middleware, issue a key and see the first request counted in the console. ## Docs: Frameworks - [Express API key middleware with rate limits](https://usagerail.com/docs/express): Checks API keys, rate limits and quotas before your routes run, and counts usage per customer in the background. - [Hono rate limiter and API key middleware](https://usagerail.com/docs/hono): A Hono rate limiter and API key middleware for Node.js: checks keys, rate limits and quotas in your process and counts usage per customer and route. - [Fastify rate limit and API key plugin](https://usagerail.com/docs/fastify): Checks keys, rate limits and quotas before your handlers and counts usage per customer and route. - [Next.js API key checks and rate limits](https://usagerail.com/docs/nextjs): Next.js API key checks, rate limits and quotas for App Router route handlers, with usage counted per customer and sent after each response on Vercel. - [Cloudflare Workers API key checks and rate limits](https://usagerail.com/docs/cloudflare-workers): Cloudflare Workers API key checks, rate limits and quotas with the Hono middleware, with usage counted per customer and sent after each response. - [FastAPI API key authentication and rate limits](https://usagerail.com/docs/fastapi): ASGI middleware for FastAPI or Starlette that checks keys, rate limits and quotas and counts usage per customer. - [Flask API key authentication and rate limits](https://usagerail.com/docs/flask): An extension that checks API keys, rate limits and quotas before your views run and counts usage per customer. - [Django rate limiting and API key middleware](https://usagerail.com/docs/django): Django rate limiting and API key checks in one middleware: UsageRail checks keys, rate limits and quotas before your views run and counts usage per customer. - [HTTP check: API key validation for any language](https://usagerail.com/docs/http-check): API key validation over HTTP from Go, PHP, Ruby, Java or .NET: one call per request checks the key, rate limit and quota and counts the usage. ## Docs: How it works - [API key rotation and verification](https://usagerail.com/docs/api-keys): How UsageRail API keys work: API key rotation with a grace period, revocation, the key format and checksum, and local checks from a synced snapshot. - [Per-customer rate limits](https://usagerail.com/docs/rate-limits): How UsageRail per-customer rate limits work: per-second and per-minute token buckets, checked in your process, with Retry-After and RateLimit headers. - [API quotas and leases](https://usagerail.com/docs/quotas): How UsageRail API quotas work: included units per period, what happens at the limit, and the leases that let most requests be checked without a network call. - [UsageRail developer portal](https://usagerail.com/docs/portal): How the UsageRail developer portal works: who can sign up, how customers sign in, create and rotate keys, check usage, and how to brand the portal. - [API usage dashboard widget](https://usagerail.com/docs/usage-widget): Embed an API usage dashboard widget in your app: sign a short-lived token for a customer and show their period usage, quota, daily trend and endpoints. - [Pricing table widget](https://usagerail.com/docs/pricing-table): Embed the UsageRail pricing table widget on your site: one script tag shows your public plans, and each button sends people to your portal to sign in and pay. ## Docs: Billing - [Stripe restricted API key and webhook setup](https://usagerail.com/docs/stripe-connection): Use a Stripe restricted API key to connect UsageRail: the permissions it needs, what we create in your account, when invoices finalize and how to rotate it. - [Stripe subscription plans and checkout](https://usagerail.com/docs/plans-and-checkout): How Stripe subscription plans and checkout work in UsageRail: prices, quotas, versions and trials, checkout, plan changes, cancellation and usage billing. - [Prepaid credits](https://usagerail.com/docs/prepaid-credits): How prepaid credits work in UsageRail: selling credit packs through Stripe, the order credits are used in, expiry, refunds, debt and low balance alerts. - [Existing Stripe subscriptions](https://usagerail.com/docs/existing-subscriptions): Keep existing Stripe subscriptions billing as they are while UsageRail applies plan limits: map their prices to plans, link customers and report usage. ## Docs: Reference - [UsageRail server API](https://usagerail.com/docs/server-api): Create customers, issue and revoke API keys, read usage, change plans and sign customers in to the portal from your backend. - [Deleting customers, apps and your account](https://usagerail.com/docs/deleting): How deleting a customer, an app or your account works in UsageRail: what stops at once, what it waits for, what's cleaned up in Stripe and what's kept. - [Known limitations](https://usagerail.com/docs/known-limitations): Features that aren't live yet, when usage counts can be lost, where limits bend, and size limits for each SDK process. ## Pricing - [UsageRail pricing](https://usagerail.com/pricing): Free until you bill $1,000 a month through it, then $29, $79 or $199 a month. No revenue share and no fee per SDK request. ## Product - [API developer portal with self-serve keys and billing](https://usagerail.com/api-developer-portal): A hosted API developer portal where your customers sign up, create API keys, pick a plan, pay through your Stripe and track usage. No gateway. - [API analytics by customer and endpoint](https://usagerail.com/api-analytics): API analytics that show usage by customer, endpoint and outcome (2xx, 4xx, 5xx), next to quotas and billing. Add one middleware to Express, FastAPI and more. ## Guides - [API monetization: how to charge for your API](https://usagerail.com/api-monetization): A practical guide to API monetization: pricing models, real pricing examples, how to meter usage and bill it through Stripe, and a calculator to price your API. - [Usage-based pricing: models and real examples](https://usagerail.com/usage-based-pricing): Usage-based pricing explained with real API examples: per request, tiered, prepaid credits and hybrid plans, and how to pick the right model for your API. - [Usage-based billing for APIs, explained](https://usagerail.com/usage-based-billing): How usage-based billing works for an API: what to meter, how to price it, how Stripe meters and invoices fit in, and the mistakes that cause billing errors. - [Metered billing for APIs](https://usagerail.com/metered-billing): Count usage per customer, set included units and overage prices, and send accurate usage to Stripe at the end of each period. - [Stripe usage-based billing, step by step](https://usagerail.com/stripe-usage-based-billing): Set up Stripe usage-based billing step by step: meter, metered price, subscription, usage reporting and invoice checks. Node and Python code included. - [API rate limiting: algorithms, headers and code](https://usagerail.com/api-rate-limiting): API rate limiting done right: token bucket vs sliding window, which headers to send with a 429, per-customer limits, and working Express and FastAPI code. ## Tools - [API key generator](https://usagerail.com/tools/api-key-generator): Create secure random API keys with a prefix and checksum, right in your browser. Nothing is sent to a server. Copy and use. - [Stripe fee calculator](https://usagerail.com/tools/stripe-fee-calculator): See what Stripe takes from a payment, including Stripe Billing, international cards and currency conversion, and what you keep. - [Best usage-based billing software for API teams](https://usagerail.com/best-usage-based-billing-software): We compared usage-based billing software for teams that sell an API: what each tool covers, how it charges, and where it falls short. Prices checked monthly.