# AI credits

AI credits are a prepaid balance for using certain features of Appfarm AI. When you use [Agent mode](/reference/appfarm-ai/build.md), credits are automatically deducted from your balance based on usage. [Ask docs](/reference/appfarm-ai/ask.md) is free to use.&#x20;

AI credits are allocated to a specific [Solution](https://policies.appfarm.io/glossary/product-glossary#solution) and remain valid as long as your subscription or free trial is active.

All users working within a Solution in Appfarm Create share the same credit pool. Credits belong to the Solution and cannot be transferred or reallocated to other Solutions.

### Check your balance and purchase credits

You can check the current balance in your Solution by hovering over the **Agent** button at the bottom of the Appfarm AI sidebar, as shown below.

<figure><img src="/files/tA2Rhtzw2h4S7RgyhrcK" alt="" width="340"><figcaption></figcaption></figure>

This is also where you find the link to buy more credits. Click the link to visit a new page where you can purchase a block of credits using your credit/debit card. After your purchase, refresh your Solution to ensure the new credits are available.&#x20;

### Credit usage

Credits are consumed every time Agent mode performs a task in your solution, and the exact number of credits used depends on the complexity of the task performed. For example, asking the agent to change the colour of a button uses fewer credits than asking it to create a complete Dashboard view. Additionally, the size of your app and the length of the current thread will also affect the number of credits consumed.

For more details around the use of AI credits, refer to the [Terms of use](https://policies.appfarm.io/service-and-usage/ai-credits-terms-of-use).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appfarm.io/reference/appfarm-ai/ai-credits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
