# AI Edit Mode

The AI Editor in Thunkable is available in both the Design tab and the Blocks tab, helping you build screens and generate logic with ease.&#x20;

The AI Editor on the Blocks tab in Thunkable is a fast and convenient way to build your app by generating blocks using natural language. Powered by ChatGPT, this feature helps you quickly create functionality without manually searching for each block, so you can focus more on your app’s logic and design.                                                               &#x20;

### What is the AI Blocks generation?

AI Blocks Generation is an in-app tool that lets you describe what you want your app to do, and it automatically creates the necessary blocks for you. Integrated directly into the Thunkable platform, it uses ChatGPT to understand your requests and generate working blocks in real-time.

### Key Benefits

* Instant block creation based on natural language instructions.&#x20;
* Accessible anytime via the Blocks tab in your project.&#x20;
* AI finds and inserts blocks for you.
* Conversation-friendly, so you can continue asking for new features as needed.&#x20;

### How it Works

To use the AI Editor to generate blocks:

* Open your project
* Go to the Blocks tab
* Click the AI icon

<div align="left"><figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FfgchLnJG8537hf4ugjMf%2Fai%20icon.png?alt=media&#x26;token=1609f784-af13-4dd7-b13a-a4ef866c3e91" alt="" width="131"><figcaption></figcaption></figure></div>

* Describe the functionality you need

<div align="left"><figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FAjMqvB5yyhhVlsjRzCv5%2FAI%20block%20generation.png?alt=media&#x26;token=0e697691-ea4a-456e-8f22-1f823cfd11da" alt="" width="375"><figcaption></figcaption></figure></div>

* Keep interacting, asking for additions, or more features. <br>

### Example Questions

Try asking:

* Create navigation for all labels to screens with matching names
* Sign in using email and password from Text\_Input1 and show the Google profile
* When button is clicked, loop through each item in list and display them in label
* On button click, change the label's text to ‘clicked’
* When an item in Simple List is clicked, change text color to yellow
* When button is clicked, count with i from 1 to 5, repeat with j from 1 to 2, and set label's text to join i and j

{% hint style="info" %}
Using AI features requires tokens. You can check your token balance in the lower-left corner of your project screen.&#x20;
{% endhint %}


---

# 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.thunkable.com/getting-started/gen-ai/ai-edit-mode.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.
