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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flashback.tech/support-reference/platform-api-reference/credits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
