# AI Credits

"AI Credits" is a separate balance that pays for calls to models: responses in the [AI chat](https://support.watbot.org/ai/chat), responses of the [AI agent](https://support.watbot.org/chatbots/blocks/ai-agent) in a bot and [building a bot](https://support.watbot.org/chatbots/ai-builder). There is no subscription fee: you are charged only for what the model actually did.

There is one balance for the whole account, shared by all your projects. The currency is the same as that of your account balance.

> [!NOTE]
> A knowledge base is paid differently — monthly, from the account balance. "AI Credits" are not spent on it. See the [Plan and tokens](https://support.watbot.org/knowledge-bases/plan) page for details.

## How to top up

"AI Credits" are topped up by a transfer from the account balance — one to one, with no fee.

1. Open the "Billing" section and choose "AI Credits" in the menu on the right.
2. Click "Top up".
3. In the "Top up AI Credits" window, enter the amount. It must have no more than two decimal places, for example 500 or 99.90.
4. Click "Top up".

Above the amount field is the "Internal balance" — how much money is on the account balance; below the field is the current "AI Credits" balance.

If there is not enough money on the account balance, the "Insufficient funds" window opens with the missing amount: top up the account balance first, and the transfer will follow.

> [!IMPORTANT]
> Only money is transferred to "AI Credits". Bonus points cannot be used for top-ups.

Below the balance is the "Top-up history": the date and amount of each transfer. The current "AI Credits" balance is also visible on the "Plan" and "Transactions" pages next to the account balance and bonus points.

You can also top up "AI Credits" right from the chat: when the funds run out, the project owner sees the "Top up" button above the input field.

## Who pays

Usage is charged to the **project owner's** "AI Credits". If a team member works in the project's AI chat or an AI agent replies in the project's bot, the owner pays. A team member does not need their own "AI Credits" to work in someone else's project.

## How the cost is calculated

Models count text in tokens. A token is a word or part of a word. A model's price is given per million tokens, separately for input and output.

- **Input tokens** — everything the model received: your question, the whole previous conversation, attached documents, tool results.
- **Output tokens** — what the model wrote in response.

Cost of a response = input tokens × input price + output tokens × output price. Model prices are on the [Prices of additional services](https://support.watbot.org/billing/services) page, and in your account — in the ["AI models"](https://support.watbot.org/ai/models) section.

This leads to three rules for saving money:

- **A long conversation costs more than a short one.** With each new message, the model receives the whole history again. Start a new conversation for a new topic, and shorten a long one with "Compress context".
- **Tools add requests.** When the model searches the web or reads a document, it calls itself several times in a row: it asks, gets the result, continues. Each such call is paid for.
- **The model matters more than the length of the question.** The same response can differ in price many times over on different models.

### Prompt cache

The beginning of a request in a long conversation repeats from message to message: the same instructions, the same history. Some models can remember this repeated beginning — this is the cache.

- **From cache** — tokens the model took from memory instead of processing them again. They cost less than regular input.
- **Cache write** — tokens the model saved to memory for the next requests.

Cache prices are shown on the model page: "Cached input" and "Cache write". If a model has no such prices, these tokens are counted at the regular input price. You do not need to do anything for this — the cache works on its own.

### What is paid for besides responses

- **Web search** — each search is paid for separately, on top of tokens.
- **The chat's service requests** — the conversation name, step headings in a response, detecting a document's language. They are performed by a separate service model; each one appears in "Logs" as a separate row.
- **Context compression** — the summary is written by the selected model.
- **A stopped response** — you pay for the part of the work the model managed to do before it was stopped.

## When the funds run out

The platform checks "AI Credits" before each response.

**In the AI chat.** The message is not sent and stays in the input field together with the attachments. Above the field you see: "Not enough AI Credits. Top up your balance to continue." The project owner sees the "Top up" button next to it, a team member sees only the message.

If the funds run out in the middle of a response in which the model is working with tools, the response stops. What the model managed to write stays in the conversation.

**In a bot with an AI agent.** The agent does not reply, and the "AI error" output fires. What to do with it is on the [AI Agent](https://support.watbot.org/chatbots/blocks/ai-agent) page.

> [!WARNING]
> A response is paid for after it is ready, so the last response can take the balance slightly below zero. The negative amount is covered by the next top-up.

## "Logs"

The "AI models" → "Logs" section. Every call to a model in the project is recorded here, newest first.

| Column | What it shows |
|---|---|
| "Time" | When the call was made |
| "Provider" | The model's developer |
| "Model" | Which model responded |
| "Input tokens" | How many tokens the model received. Below — how many of them were "from cache" and "to cache", if the cache was used |
| "Output tokens" | How many tokens the model wrote |
| "Type" | What the call was |
| "Cost" | How much was charged to "AI Credits" |
| "Chat" | A link to the conversation, if the call was made from the AI chat |

Call types:

- "Message" — a response in the AI chat;
- "Tool call" — a call in which the model requested a tool;
- "Web search" — the search itself;
- "AI agent" — an agent's response in a bot;
- "Context compression", "Chat title", "Steps title", "OCR language" — service requests.

One response in the chat can take several rows: the model requested a tool, got the result, responded.

Above the table are the "Provider" and "Model" filters and the period selection.

> [!NOTE]
> The "Chat" link opens the conversation only if it is yours: conversations are personal, and someone else's conversation will not open from the link.

## "Statistics"

The "AI models" → "Statistics" section. Two charts for the selected period:

- **"Token usage"** — input and output tokens. If the cache was used, input tokens are split into regular, "From cache" and "Cache write".
- **"Requests"** — the number of calls to models.

Above the charts are the period and granularity, the "Provider" and "Model" filters, and a view switch: lines or bars.

Statistics show tokens and requests, not money. For the amounts per call, see "Logs".

The same statistics for a single model are on the model page in the catalogue.

## Who sees logs and statistics

The project owner sees everything. A team member needs the "View logs" and "View analytics" permissions in the "AI agents / Chat" group of their role. How to set up a role is on the [Team member access](https://support.watbot.org/chatbots/settings/access) page.

"AI Credits" themselves and topping them up are in the account owner's "Billing" section: everyone sees and tops up only their own balance.
