> 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

Understanding how tokens work helps you use your AI budget wisely and avoid unexpected costs.

### 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, agents are temporarily unavailable until your next billing cycle, or until you buy more tokens - use the **Buy more tokens** button on the main AI Studio screen.

To avoid this, [set up an alert](/product-documentation/company-management/company-insights/company-insights-overview/configuring-usage-alerts.md) to let you know when you're running low.
{% endhint %}

<div data-with-frame="true"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FSTKhlPWe0RSVjHKDYgSe%2FScreenshot%202026-07-28%20at%2011.21.10.png?alt=media&amp;token=947ab367-dddd-4f72-9054-1fa51696e479" alt="" width="375"><figcaption></figcaption></figure></div>

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

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FqfkZgiEGkGunHAM92guB%2FScreenshot%202026-06-23%20at%2009.58.58.png?alt=media&amp;token=0b76a9e5-dbb9-4d09-95ed-5dcd82fcc002" 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.
