# 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.

{% hint style="info" %}
To perform these operations, you must be authenticated by means of one of the following methods: [BearerAuth](https://docs.flashback.tech/support-reference/authentication#http-bearer-authentication). The **packs** and **rates** endpoints are public and do not require authentication.
{% endhint %}

## Credits API Calls

| Method                                                          | API Reference                                                                                                                                 | Description                                                               |
| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| <mark style="color:green;">`GET`</mark>`/credits/balance`       | [**get\_\_credits\_balance**](https://docs.flashback.tech/support-reference/platform-api-reference/credits/get__credits_balance)              | Get current credit balance (stored + realtime) and consumption breakdown. |
| <mark style="color:green;">`GET`</mark>`/credits/transactions`  | [**get\_\_credits\_transactions**](https://docs.flashback.tech/support-reference/platform-api-reference/credits/get__credits_transactions)    | Get paginated transaction history (purchases, grants, consumption).       |
| <mark style="color:green;">`GET`</mark>`/credits/stats/monthly` | [**get\_\_credits\_stats\_monthly**](https://docs.flashback.tech/support-reference/platform-api-reference/credits/get__credits_stats_monthly) | Get monthly aggregated stats (consumption, purchases, grants, balance).   |
| <mark style="color:green;">`GET`</mark>`/credits/packs`         | [**get\_\_credits\_packs**](https://docs.flashback.tech/support-reference/platform-api-reference/credits/get__credits_packs)                  | List available credit packs and prices.                                   |
| <mark style="color:green;">`GET`</mark>`/credits/rates`         | [**get\_\_credits\_rates**](https://docs.flashback.tech/support-reference/platform-api-reference/credits/get__credits_rates)                  | List credit consumption rates (e.g. per GB, per 1M tokens).               |
| <mark style="color:orange;">`POST`</mark>`/credits/packs/buy`   | [**post\_\_credits\_packs\_buy**](https://docs.flashback.tech/support-reference/platform-api-reference/credits/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.
