> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowyble.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Credits

> How the credit-based billing system works.

## Overview

Flowyble uses a **credit-based billing system**. Every LLM call and action consumes credits from your organization's balance. Credits provide a unified currency across different models and providers.

## How credits are calculated

Each LLM call costs credits based on:

| Factor            | Description                                  |
| ----------------- | -------------------------------------------- |
| **Input tokens**  | Number of tokens sent to the model           |
| **Output tokens** | Number of tokens generated by the model      |
| **Model rate**    | Per-model pricing (credits per 1,000 tokens) |

```
Credits = (InputTokens × InputRate + OutputTokens × OutputRate) / 1000
```

Different models have different rates. More capable models (e.g. GPT-4o, Claude Opus) cost more credits per token than smaller models (e.g. GPT-4o Mini, Claude Haiku).

## Credit tracking

Every credit deduction is recorded as a **CreditTransaction** with:

* Token and action counts
* Raw and normalized credit amounts
* Balance before and after the transaction
* Associated run ID for traceability

## Monitoring usage

Track your credit consumption from the **Dashboard**:

* Current balance and monthly usage
* Usage breakdown by agent, tool, and model
* Historical trends

## Credit limits

Your subscription plan defines monthly limits:

| Limit                 | Description                       |
| --------------------- | --------------------------------- |
| **Max Tokens/Month**  | Total tokens across all LLM calls |
| **Max Actions/Month** | Total function/tool executions    |
| **Max Credits/Month** | Total credit spending             |

When you approach a limit, Flowyble displays warnings. When a limit is reached, new executions are blocked until the next billing cycle.

<Warning>
  Credits consumed during a failed run are still deducted — they represent actual LLM API usage that occurred before the failure.
</Warning>
