Billing
Every gateway call lands in the usage ledger. No black-box deductions, no nightly reconciliation β the wallet you see in the dashboard is the wallet that just got charged.
Credits
We bill in credits, an abstract unit. The conversion from raw provider cost to credits is:
credits = baseModelRatio Γ groupRatio Γ completionRatio Γ usage
baseModelRatiois the per-model multiplier admin sets in the channel registry.groupRatiois your tier's group multiplier (free / pro / team / enterprise).completionRatiodistinguishes completion tokens from prompt tokens for models that price them differently.
The final credit number, the underlying token counts, and the time-to-first-token (for streaming) are all stored on the usage row.
Top-up flows
Two ways to add credits:
- Credit packs β one-time purchases via /order?type=credits. FIFO consumption β older packs drain first.
- Subscription β Pro / Team / Lifetime tiers ship a monthly credit grant on renewal. Renewal credits arrive after the Stripe
invoice.payment_succeededwebhook lands.
Refunds
Refunds go through admin. If a call failed because of a gateway-side bug, mark the usage row and admin will issue a credit. We do not auto-refund based on response status because retries already absorb genuinely transient failures.
Invoices
Every paid order can be downloaded as PDF or CSV from the order history page. Stripe-side invoices are also linked when applicable.