> 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-users/api-access.md).

# API Access

Create personal access tokens to use Blockbrain from your own scripts and tools, for example through the LLM API.

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2Fsh4AoLXgw82wwbDz5ixU%2Fc-api-access.jpg?alt=media&amp;token=c10ad76f-319a-4e43-937c-a6ee9a128f16" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
A token acts as you. It can do what you can do, and its usage counts against your Compute Block limit.
{% endhint %}

#### Create a token

**To create a token:**

1. Click your profile icon in the top right corner and select **API Access**.
2. Click **Create token**.
3. Enter a **Name**, for example "CI pipeline".
4. Optionally set an **Expiration** date. Without one, the token never expires.
5. Click **Create token**.
6. Copy the token and store it in a safe place.

{% hint style="warning" %}
You can only copy the token once. Save it right away, you won't be able to see it again.
{% endhint %}

#### Manage your tokens

The list shows every token with its **Name**, the last characters of its **Key**, its **Status** (Active, Expired or Deactivated), when it was **Created** and when it **Expires**.

A token cannot be edited. To replace a token, create a new one and delete the old one.

**To delete a token:**

1. Click the delete icon in the row of the token.
2. Confirm with **Delete**.

Any client that still uses the token stops working. This can't be undone.

#### Set a Compute Block limit

You can cap how many Compute Blocks a token may use. Click **Set a limit** in the **CB limit** column, enter the number and click **Save**. The column then shows how much of the limit is used.

The limit can't be higher than your own available budget. It only works when Compute Block limits are turned on for your organization. See [Setting Limit](https://docs.blockbrain.ai/for-admins/cost-control/setting-limit.md).


---

# 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-users/api-access.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.
