Skip to content

MicroAuthTurn your API into a paid product

API keys, rate limits and metered billing for your API — enforced by an SDK inside your service, so your traffic never touches a proxy.

main.py
from fastapi import FastAPI, Security
from microauth_fastapi import MicroAuth, Customer

app = FastAPI()
auth = MicroAuth(app)  # auth, limits & billing — two lines

@app.get("/forecast")
async def forecast(customer: Customer = Security(auth)):
    return {"hello": customer.id}
pip install microauth-fastapi

MicroAuth is a product of Zyref, LLC.