The AI Request block

AI Request block

The AI Request block runs an AI request that you select from a collection and sends the result from its output port.

To learn more about AI requests and AI request blocks, see Build AI agents with the Postman AI Agent Builder.

Input

Send - If you connect another block to this input port, that block triggers the AI Request block to run. This connection is optional. The AI Request block will run when the flow runs, even if this port isn't connected to another block.

Outputs

Success - Sends the response of a successful API request. A successful request has a 2xx HTTP status code.

Fail - Sends the response of an unsuccessful API request. An unsuccessful request has an HTTP status code other than 2xx.

Setup

Select a request - Select this dropdown list to see all the collections in your workspace. Select a collection, then select an AI Request.

Variables - If the selected request has one or more variables, they'll be listed here. You can assign a value to a variable by connecting another block's output port to the variable's input port, or by embedding a data block with Add icon Add data blocks. If your request uses environment variables, you can select the environment from the Add environment dropdown list.

The Select and Evaluate blocks are often connected to the AI Request block. The Select block is useful for extracting specific information from a response. The Evaluate block is useful for transforming response data and creating conditions to route data in your flow based on a response.

Last modified: 2025/01/22