> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/ai/patchworks-ai-studio/tokens.md).

# Tokens

### What is a token?

AI tokens are the unit of measurement used to track how much work your AI agents are doing inside Patchworks. Every time you interact with an AI feature - whether that's chatting with an agent, building a connector, or running a flow - tokens are being consumed.

***

### How tokens are used in Patchworks

Token consumption varies significantly depending on what you're doing. Here's a practical breakdown, for one prompt against the following agents:

| Agent                                                                               | Typical token range |
| ----------------------------------------------------------------------------------- | ------------------- |
| Flow Builder ( without Mapping )                                                    | 36,000 - 40,000     |
| Smart Mapping ( 1 Map request )                                                     | 47,000 - 52,000     |
| Connector Builder                                                                   | 90,000 - 120,000    |
| Full Implementation ( Full Flow including multiple maps, connectors already exist ) | 92,000 - 110,000    |

***

### Checking your balance and buying more

Every company has a monthly token allowance for AI Studio. You can see your current usage in the top-right of the Agents page. Token consumption varies by agent and task complexity - building a multi-step flow with mapping will use more tokens than a simple single-step flow.

{% hint style="warning" %}
Token limits are enforced per company. If you reach your monthly limit, AI Studio features will be temporarily unavailable until the next billing cycle or if you buy additional tokens. **You can purchase more tokens from the button "Buy more tokens" on the main AI Studio screen.**
{% endhint %}

<figure><img src="/files/7HNUtK336blG7dL2yp8G" alt=""><figcaption></figcaption></figure>

Once payment is complete, your reference and top-up history are available in your Company profile under Allowances.

<figure><img src="/files/f6WEKbYQZ5q8qFqP7GnI" alt=""><figcaption></figcaption></figure>

***

### Practical guidance

#### Check your balance before large tasks

Before starting a connector build or a full implementation session, check your current token balance in **Main side menu → AI Studio**. If your balance is low, top up before starting rather than mid-task.

#### Break large tasks into stages

If you're building a complex connector with many endpoints, consider building it in stages. Completing the core authentication and a handful of critical endpoints in one session, then extending in a second, can make usage more predictable and easier to review.

#### Avoid redundant context

When chatting with agents, be specific. A focused question uses far fewer tokens than a broad one. Asking "why did run 4821 fail?" is more efficient than "can you look through my recent runs and tell me if anything looks wrong?"

#### Reuse what you've built

Connectors built with AI can be reused across flows and clients. The token cost is a one-time investment - once a connector exists, subsequent flows using it don't require rebuilding it from scratch.
