Introduction
The JSON API element allows your AI agent to call an external web API, retrieve data in JSON format, and pass that data to the language model (LLM) for processing.
This is useful when you want the AI to use real-time or external information (e.g., weather data, stock prices, product details, etc.) to answer questions, generate responses, or perform actions.
Get started
How to use it
To use the JSON API Element, add the JSON API prompt:
- Locate the JSON API element under the Prompts section of the palette.
- Drag and drop the element into the Drop a prompt to here area.
Configure form properties
To properly integrate and configure the JSON API, set the following fields:
Name | Description | ||||
---|---|---|---|---|---|
JSON URL | The full URL of the API you want to call. This is where the data comes from. | ||||
Call Type | Select the type of call. Options include:
| ||||
Request Headers | Add name(s) and value(s) to the request header.
| ||||
Passover Current Requests Cookies | If enabled, cookies from the current session will be included in the API call. Useful only for internal/private APIs that require logged-in session data. | ||||
Debug Mode | If turned on, this will print API request and response data to logs or output for troubleshooting. Turn this on while testing. Turn it off in production. |