Credits
The Credits API lets you manage and inspect your organization's credit balance when the platform is configured for the credits-based subscription system (SUBSCRIPTION_SYSTEM=credits). Credits are consumed by storage egress and AI token usage and can be topped up via subscriptions or one-time pack purchases.
Quick summary
GET /credits/balance
Current credit balance (stored + realtime) and consumption breakdown
Bearer
GET /credits/transactions
Paginated transaction history (purchases, grants, consumption)
Bearer
GET /credits/stats/monthly
Monthly aggregated stats (consumption, purchases, grants, balance) for histograms
Bearer
GET /credits/packs
List available credit packs and prices
None
GET /credits/rates
List credit consumption rates (e.g. per GB, per 1M tokens)
None
POST /credits/packs/buy
Start a Stripe checkout to buy a credit pack
Bearer
Balance and transactions are scoped to the authenticated user's organization.
Packs and rates are public reference data.
Buy pack requires a paid subscription (Starter or above) and enforces a per-pack-type limit per billing cycle (e.g. 3 of each pack per cycle).
See the individual endpoint pages below for request/response shapes, client usage, and security details.
Last updated
Was this helpful?