Skip to main content
Every request through qlaud lands one row in our usage_events table: You read this back via two endpoints.

GET /v1/usage — rollup

Default window: month-to-date. Override with from_ms / to_ms.

GET /v1/keys/:keyId/usage — drilldown

Single key. Includes the 100 most recent events.
Use this for a per-user usage page in your app — show the user their last N requests, current spend, cap.

Pricing & markup

The catalog has the customer-facing price for every model (qlaud.ai/models). Those prices already include our flat 7% markup on top of upstream cost. So cost_micros is what you owe us. Bill your end-users anything you want on top — the difference is your margin.

Invoicing pattern (Stripe)

End of month, pull /v1/usage, fold each by_key row into a Stripe InvoiceItem:
Stripe rolls all open InvoiceItems into the customer’s next invoice. Set their subscription’s billing cycle to monthly and you’re done. See the full walkthrough in Per-user billing.