For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

To perform these operations, you must be authenticated by means of one of the following methods: BearerAuth. The packs and rates endpoints are public and do not require authentication.

Credits API Calls

Method
API Reference
Description

GET/credits/balance

Get current credit balance (stored + realtime) and consumption breakdown.

GET/credits/transactions

Get paginated transaction history (purchases, grants, consumption).

GET/credits/stats/monthly

Get monthly aggregated stats (consumption, purchases, grants, balance).

GET/credits/packs

List available credit packs and prices.

GET/credits/rates

List credit consumption rates (e.g. per GB, per 1M tokens).

POST/credits/packs/buy

Start a Stripe checkout to buy a credit pack.

  • 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?