***

title: Add AI request blocks to your notebook
slug: docs/postman-api-network/showcase/publish/notebooks/draft/add-ai-request-blocks
max-toc-depth: 2
---------------------

For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

Add an AI chat interface to your notebook to create an interactive experience. For example, you can [add a request block](/docs/postman-api-network/showcase/publish/notebooks/draft/add-request-blocks/) and [reference its response](/docs/postman-api-network/showcase/publish/notebooks/draft/add-request-blocks#reference-your-request-block) to analyze it with an AI model of your choice.

You can also reference an AI request block's prompts and responses elsewhere in your notebook.

## Add an AI request block

To add an AI request block, do the following:

1. Open your notebook or [create a new one](https://www.postman.com/notebook/new).
2. Place your cursor where you want to add the AI request block. Then, enter a forward slash ("/"). Postman displays a block menu.
3. Choose <img alt="Postbot icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/descriptive-postbot-stroke.svg#icon" width="20px" /> **AI Request**.
4. Name your AI request block.
5. Choose a model provider and model, and (optional) add an MCP server.
6. Add your API key.
7. Enter your user prompt.
8. (Optional) Click **Settings**, enter your system prompt, and adjust your settings.
9. Click <img alt="Run icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/action-run-stroke.svg#icon" width="20px" /> **Send message**.

Postman adds your message and the model's response to the conversation.

## Reference your AI request block

Reference your AI request block by name. For example, if you name your AI request block "welcomeChatBot", you can reference its interactions with the syntax `{{welcomeChatBot}}` in text, an [input block](/docs/postman-api-network/showcase/publish/notebooks/draft/add-input-blocks/), a [request block](/docs/postman-api-network/showcase/publish/notebooks/draft/add-request-blocks/), or another AI request block.

Or you can reference it with the syntax `$welcomeChatBot` in a [script runner block](/docs/postman-api-network/showcase/publish/notebooks/draft/add-script-runner-blocks/).

Furthermore, you can use dot notation to reference data within the interactions. Each interaction is an object in an array, where each object represents a prompt or response. For example, in a request block, you can reference your first prompt with the syntax `{{welcomeChatBot.0}}`. Or in a script runner block, you can reference the same value with the syntax `$welcomeChatBot[0]`.

To reference your AI request block, do the following:

1. Open your notebook or [create a new one](https://www.postman.com/notebook/new).
2. Get your AI request block's name.
3. Reference your AI request block:

   * To reference your AI request block in text, an input block, a request block, or another AI request block, use the syntax `{{aiRequestBlockName}}` or `{{aiRequestBlockName.path.to.data}}`.
   * To reference your AI request block in a script runner block, use the syntax `$aiRequestBlockName` or `$aiRequestBlockName.path.to.data`.