> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/reference/appfarm-ai/ai-credits.md).

# AI credits

AI credits are a prepaid balance for using certain features of Appfarm AI. When you use [Build](/reference/appfarm-ai/build.md) mode, credits are automatically deducted from your balance based on usage. [Ask](/reference/appfarm-ai/ask.md) mode 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 **Build** button at the bottom of the Appfarm AI sidebar, as shown below.

<figure><img src="https://29237295-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiLU-xcHu0eLZiTxcmZ%2Fuploads%2Fae6gafl0qy9ZlXETlX4x%2Fimage.png?alt=media&amp;token=ce960e8a-1631-4f06-9826-a117e9b0dac1" alt=""><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 Build 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
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.appfarm.io/reference/appfarm-ai/ai-credits.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.
