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:
Adding the JSON API prompt
- Locate the JSON API element under the Prompt Plugin section.
- Drag and drop the element into the “Drop a prompt here” area.
Configure form properties
To properly integrate and configure the JSON API, set the following fields:
- 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:
- GET
- POST
- PUT
- DELETE
- Request Headers: Add name(s) and value(s) to the request header.
- Name: Name (or Type) of the Request Header.
- Value: Link or Value of 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.