> For the complete documentation index, see [llms.txt](https://docs.blockbrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockbrain.ai/for-admins/cost-control/setting-limit.md).

# Setting Limit

Decide how many Compute Blocks people, groups, API keys, and public bots can use, and over which timeframe.

{% hint style="info" %}
When more than one limit could apply to a user, the most specific one wins: per-user override, then group limit, then default limit. See How limits stack.
{% endhint %}

#### Default user limit

The default limit applies to every user who has no override. On the **Compute Blocks** page in the Admin Panel, go to **Default user limit** and click **Edit limit**.

| Setting            | Default value | Options                  |
| ------------------ | ------------- | ------------------------ |
| **Limit type**     | Limited       | Limited / Unlimited      |
| **Compute Blocks** | 500,000       | Any whole number         |
| **Timeframe**      | Monthly       | Daily / Weekly / Monthly |
| **Reset time**     | Midnight      | Any time of day          |

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2F2Pve7KxOqwaEZanv5vmo%2FScreenshot%202026-10-23%20at%2011.21.24.png?alt=media&amp;token=4d31646f-3ed2-4dc9-862b-87de41d2d281" alt="" width="563"><figcaption></figcaption></figure>

#### Limits Overrides

Overrides let you depart from the default limit. Manage them in the **Limits Overrides** area of the Compute Blocks page. It has four tabs, with a shared search bar and a **New Override** button. Every tab supports inline editing, bulk actions, and pagination.

| Tab          | What it limits          | Columns                                                         |
| ------------ | ----------------------- | --------------------------------------------------------------- |
| **Users**    | Individual users        | Limit type, Compute Blocks, Timeframe, Last Updated             |
| **Groups**   | Active Directory groups | Limit type, Compute Blocks, Timeframe, Reset time, Last Updated |
| **API Keys** | Individual API keys     | Compute Blocks, Timeframe, Last Updated                         |
| **Bots**     | Public bots             | Compute Blocks, Timeframe, Used / Cap, Extra Usage Amount       |

**Per-user override**

You can override the limit for a user in the **Users** tab, or directly in **User Management**, where each user row has editable **Compute Blocks** and **Timeframe** columns.

**To override a user's limit in User Management:**

1. Go to **User Management**.
2. Find the user in the list.
3. Edit the **Compute Blocks** and **Timeframe** values in that user's row.
4. Save your changes.

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FLGw4qxzoFNAIBMFd9cwl%2FScreenshot%202026-05-18%20at%2015.22.11.png?alt=media&#x26;token=fdcfbfd5-4bd5-484c-b147-9993c7505981" alt=""><figcaption></figcaption></figure>

**Group limits**

Apply a CB limit to **many users at once** by targeting an **Active Directory (AD) group**, instead of editing users one by one.

**To set a limit for a group:**

1. Go to the **Groups** tab in Limits Overrides.
2. Select the AD group you want to configure, or click **New Override**.
3. Set the **Limit type**, **Compute Blocks** and **Timeframe**, and optionally a **Time Zone** and **Reset time**.
4. Save your changes. The limit applies to all group members immediately.

| Setting            | Default value | Options                  |
| ------------------ | ------------- | ------------------------ |
| **Compute Blocks** | 5,000,000     | Any whole number         |
| **Timeframe**      | Monthly       | Daily / Weekly / Monthly |

Only the usage of the group's members counts toward a group limit.

**When a user is in several groups**

By default, a user in several limited groups gets the most generous of those group limits. Two switches change this:

* **Add up group limits:** the user gets the sum of their group limits instead of only the highest one. Groups with the same period are added together, and the period with the most Compute Blocks per day applies.
* **Add the default limit on top:** group members also get the default limit on top of their group limit. This works with or without adding up group limits.

{% hint style="warning" %}
If the default limit is Unlimited and **Add the default limit on top** is on, every group member becomes Unlimited. Turn the switch off to keep group limits.
{% endhint %}

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FVI4ox5rBIAkpBQBznU8p%2FScreenshot%202026-10-23%20at%2011.31.38.png?alt=media&amp;token=de11173d-ce08-4e79-9c65-78ebb02d3e57" alt=""><figcaption></figcaption></figure>

***

#### API key limits

**Limits set by admins**

Set a CB limit on each API key so no single key can go over its budget.

**To set a limit for an API key:**

1. Go to the **API Keys** tab in Limits Overrides, or open **API Key Management** in Admin.
2. Select the API key, or click **New Override**.
3. Set the **Compute Blocks** limit and **Timeframe** for that key.
4. Save your changes.

| Setting            | Default value | Options                  |
| ------------------ | ------------- | ------------------------ |
| **Compute Blocks** | 5,000,000     | Any whole number         |
| **Timeframe**      | Monthly       | Daily / Weekly / Monthly |

{% hint style="info" %}
API key limits work independently of user limits. A user may still have capacity while their API key is blocked, or the other way around.
{% endhint %}

**Limits users set on their own API keys**

Users who create their own API keys can give each key a Compute Block limit, so a script or integration cannot use up their whole allowance.

1. Open **API Access** from the account menu.
2. Next to a key, click **Set a limit** (or **Edit** to change it).
3. Enter the number of Compute Blocks and click **Save**. **Remove limit** takes it off again.

The key then shows its usage, for example "12,400 / 50,000 used", and "Limit reached" once it is used up. Requests made with that key stop at that point.

Rules:

* The limit cannot be higher than what the user still has available. If it is, the user sees "Exceeds your available budget".
* It only works when Compute Block Limits are turned on for the organization.
* Users can only limit their own keys.

***

#### Bot limits

Set a **Compute Block cap on individual public bots**. Interactions with a capped bot are charged against the bot's own pool instead of the user's personal allowance. This gives you spend control per bot.

**Key behaviors:**

* A bot without a cap falls back to the normal user limits.
* The bot cap sits alongside the user, group, and default limits. Those still govern the user's own pool.
* What happens when a bot reaches its cap is set per bot: a full block, or a request for more through Extended Usage Amounts.
* The **Bots** tab shows each bot's **Used / Cap** and its **Extra Usage Amount**.

**To set a CB limit on a bot:**

1. Open the bot's configuration in the admin panel, or use the **Bots** tab in Limits Overrides.
2. Go to the **Cost Control** section (visible to the Cost Manager role and above).
3. Set the **Compute Blocks** cap and choose the **at-limit behavior**.
4. Save your changes.

To warn admins before a bot runs out, see Bot alert notifications.

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FluBU2RpUAWszbePxqQ1B%2FScreenshot%202026-08-25%20at%2016.07.50.png?alt=media&#x26;token=b7935731-7c97-4325-8b67-a7e472025dbc" alt="" width="375"><figcaption></figcaption></figure>

***

#### Adjusting limits

You can change any limit at any time: the default limit on the **Compute Blocks** page, user overrides in **Limits Overrides** or **User Management**, group, API key and bot limits in their **Limits Overrides** tabs. Changes take effect **immediately** after saving.


---

# 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.blockbrain.ai/for-admins/cost-control/setting-limit.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.
