> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/fabricate/about-fabricate/fabricate-pricing-and-ai-usage/tracking-and-limiting-ai-usage-and-cost.md).

# Tracking and limiting AI usage and cost

## Tracking the cost of a Data Agent conversation

For a Data Agent chat, to track the cost of a conversation, hover over the usage icon.

The tooltip includes the cost so far of the conversation.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FcQ5AJ4gSF5PzNhrL60ue%2FDataAgent_UsageTooltip.png?alt=media&amp;token=c28f980d-809a-48e7-b98a-ae255005dc9b" alt=""><figcaption><p>AI usage tooltip for the Data Agent with the cost of the conversation</p></figcaption></figure>

## Monitoring your AI cost

On the **Plan & Billing** page of **Account Settings**, the **AI Usage** section tracks the account's AI usage costs.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FJv8gXeClpcL4U48GXEsK%2FMyAccount_AIUsage.png?alt=media&amp;token=3cfb8d08-4740-4aac-91ee-3c263811efef" alt=""><figcaption><p>AI Usage chart to track AI usage costs for the current billing cycle</p></figcaption></figure>

For each day when there was AI usage, the chart shows the usage.

### Filtering the chart

By default, the chart shows the usage for all users for the most recent 30 days.

To filter the chart:

1. From the **User** dropdown list, select the user to display the usage for.
2. From the **Period** dropdown list, select the time period to display the usage for.\
   \
   You can select a specific time period (24 hours, 7 days, 30 days, 90 days, 180 days), or you can set a custom time period.\
   \
   To set a custom time period:
   1. From the dropdown list, select **Custom**.
   2. Select the start date for the time period.
   3. Select the end date for the time period.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FE2dmRjBB7AaFzqKgqVzY%2FAccount_AIUsageCustomPeriodFilter.png?alt=media&amp;token=c5852dbd-1525-4419-8788-3b46d754b22d" alt=""><figcaption><p>Custom time period filter for AI usage</p></figcaption></figure>

### Selecting the metric to display

From the **Metric** dropdown list, select whether to display:

* The dollar amount for the AI usage.
* The number of tokens used.

### Subdividing individual entries by model or user and API key

You can subdivide individual entries to show either:

* The amount used by each user or API key.
* The amount used by specific AI models.

From the **Split by** dropdown list:

* To identify the specific users or API keys, select **User / API Key**.
* To identify the specific models, select **Model**.

Fabricate updates the entries to indicate the usage for the individual users and API keys or the individual models.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FzNvDUi0t4G4mCuBdtV03%2FAccount_AIUsageSplitByModel.png?alt=media&amp;token=8781d830-a6b7-4250-845d-ca91480693e7" alt=""><figcaption><p>AI usage that identifies the distribution among diffferent models</p></figcaption></figure>

## Configuring the default per-user AI usage limit

On the **Plan & Billing** page of **Account Settings**, in the **AI Spend Limits** section, account owners configure the default AI usage limit for individual users.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2F5tSfQeWt6PZv72AL09v6%2FAccount_AISpendLimits.png?alt=media&amp;token=64c86feb-9544-4fed-8aa6-ae72cd7b5a43" alt=""><figcaption><p>AI Spend limits to limit each user's AI usage for a specific period of time</p></figcaption></figure>

1. In the **Per-User Limit** field, specify the maximum dollar amount of AI usage for an individual user.
2. From the **Per-User Limit Period** dropdown list, select the time period for use the limit applies. You can have the limit apply per day, every 7 days, every 30 days, or every 90 days.\
   \
   For example, if you set the limit to $5 and the time period to 30 days, then each user by default can use up to five dollars' worth of AI usage every 30 days.
3. Click **Save Changes**.
4. If there are users that have a custom limit, then select whether to keep those overrides:

   * To preserve overrides for individual users, click **Keep per-user limits**.
   * To apply the new limit to all users, and remove the current individual overrides, click **Override per-user limits**.

   After you select the option, click **Save**.

## Tracking and limiting AI usage for specific users

On the **Users** page of **Account Settings**, the information for each user includes:

* The amount of AI usage for that user.
* The current AI usage limit for that user.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FoF8hdiYJo0oME6lB26X2%2FAccount_Users.png?alt=media&amp;token=3fa45615-b6da-4124-a2a1-7fd35f268d22" alt=""><figcaption><p>Users list for an account</p></figcaption></figure>

### Setting the AI usage limit for a user

From the **Users** list, you can override the default limit for individual users. For example, you might have a user who is more of a power user and needs a higher limit.

To change the limit for an individual user:

1. In the **AI Spend Limit** column for the user, click the edit icon.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FJqfxYTgBCGmkX1W02AU8%2FAccount_UserEditAISpendLimit.png?alt=media&amp;token=bbf579db-4ce1-407d-9781-f8f52495d1bb" alt=""><figcaption><p>Edit AI Spend Limit panel for a user</p></figcaption></figure>

1. On the **Edit AI Spend Limit** panel, either:
   * In the **Billing-period spend limit** field, provide a specific value for the user. You can type the value directly, or use the up and down arrows to increase or decrease the value.
   * To reset the user to use the default limit, click **Reset To default**.
2. Click **Save**.

### Adding a temporary spending increase for a user

You can provide a temporary spending increase for a user. For example, a user might be working on a special project such as a complex simulation that requires a higher limit than they usually have.

The temporary spending increase only applies within the current billing period. The user then goes back to their regular spending limit.

To grant a temporary spending increase:

1. In the **AI Spend Limit** column for the user, click the edit icon.
2. On the **Edit AI Spend Limit** panel, in the **Temporary Spend Increase** field, provide the increased spend limit. You can type the value directly, or use the up and down arrows to increase or decrease the value.\
   \
   The value must be larger than **Billing-period spend limit**. The value is the total temporary spend limit, not the difference between the regular limit and the increased limit.\
   \
   For example, if a user has a default spend limit of $5, then to temporarily increase it to $10, in the field, set the value to 10.
3. Click **Save**.

When a temporary increase is in effect, the **AI Spend Limit** column indicates the increased limit and when it expires.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FUpw2LYrtBjD5VsIjn7I9%2FAccount_UserAILimitTempIncrease.png?alt=media&amp;token=b9417529-10ca-4240-9cc3-8b9ed4855869" alt=""><figcaption><p>AI spend limit with a temporary increase in effect</p></figcaption></figure>

## Configuring the maximum AI usage overage (Plus plan) <a href="#ai-usage-max-overage-plus" id="ai-usage-max-overage-plus"></a>

For the Plus plan, which does not support multiple users, instead of setting a limit per user, you set a maximum amount of AI usage overage for each billing cycle.

You set the limit from the **Plan & Billing** page of **Account Settings**, in the **AI Spend Limits** section.

In the **Overage Limit** field, provide the maximum overage per billing cycle. If the field is empty, then there is no limit on the AI usage overage.

When the usage cost reaches the total of your allowance plus the maximum overage, AI features are paused until the next billing cycle.

For example, your account is billed each month for the AI overage above the allowance that you receive. Your allowance is $25 for each month. The overage is set to $500. Assuming you use the $500 overage limit, your account:

* Can use up to $525 in total AI usage cost each month. After that, AI features are paused until the next billing cycle.
* Can be billed for up to $500 for overage each month.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tonic.ai/fabricate/about-fabricate/fabricate-pricing-and-ai-usage/tracking-and-limiting-ai-usage-and-cost.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
