The API node enables workflows to connect flexibly with external services—such as calling large language model (LLM) APIs for intelligent responses, retrieving third-party data (e.g., weather or stock information), or integrating with internal enterprise systems (e.g., CRM or ERP)—by configuring HTTP request methods, headers, parameters, and request bodies. It sends HTTP requests and captures responses, empowering your workflow to interact seamlessly with diverse external services.
In an intelligent customer service scenario, user-submitted questions must be sent to an external LLM to generate intelligent replies. By configuring the API node to call the Tongyi Qwen API, you can implement a complete flow—from receiving the user’s question to obtaining the AI-generated response.
You can quickly add an API node in two ways:
Configure the target API URL and HTTP method.
Click Add Variable to define multiple headers.
Configure query parameters appended to the URL after the
Click Add Variable to define multiple query parameters.
Select the body type according to your API’s requirements:
Set the maximum time to wait for a response before timing out.
Enabled by default. Automatically retries failed requests. When disabled, failures result in immediate errors.
Disabled by default. When enabled, allows custom logic for handling errors.
Stores the API response in variables for use by subsequent nodes.
Add the Bailian application service IP addresses (
Usage Example
In an intelligent customer service scenario, user-submitted questions must be sent to an external LLM to generate intelligent replies. By configuring the API node to call the Tongyi Qwen API, you can implement a complete flow—from receiving the user’s question to obtaining the AI-generated response.
Adding the Node
You can quickly add an API node in two ways:
- Add via the plus button: Click the
+button at the end of a node connection line, then select API from the pop-up list. The node is automatically added and connected. - Drag from the node library: From the left-side node management panel, locate the Tools category, drag the API node onto the canvas, and manually connect it to upstream and downstream nodes.
Node Configuration
API Endpoint
Configure the target API URL and HTTP method.
| Parameter | Description |
|---|---|
| HTTP Method | Select the HTTP request method: GET, POST, PUT, PATCH, or DELETE. Default is GET. |
| URL | Enter the full API endpoint URL. Supports direct input or variable references (e.g., ${upstream.output}) to dynamically insert outputs from upstream nodes. |
Headers
| Column | Description |
|---|---|
| Key | Header name, e.g., Authorization, Content-Type. |
| Reference Mode | Choose Reference (to reuse existing variables) or Input (to enter a literal value). |
| Value | Header value—select a variable or type a static value based on the reference mode. |
Query Parameters
Configure query parameters appended to the URL after the ? character, used to pass additional information to the API. For example, in https://api.example.com/files?limit=5, limit is the parameter name and 5 is its value—indicating a maximum of 5 results.
| Column | Description |
|---|---|
| Key | Parameter name, e.g., limit, page, sort. |
| Reference Mode | Choose Reference (to reuse existing variables) or Input (to enter a literal value). |
| Value | Parameter value—select a variable or type a static value based on the reference mode. |
Request Body
Select the body type according to your API’s requirements:
| Type | Description |
|---|---|
none | No request body—suitable for GET requests. |
form-data | For form submissions or file uploads; displays a key-value configuration table. |
raw | Default option. Plain text input (e.g., plain text, XML). |
JSON | Auto-formatted JSON editor. |
Timeout Settings
Set the maximum time to wait for a response before timing out.
| Parameter | Range | Default | Description |
|---|---|---|---|
| Timeout | 1–120 seconds | 5 | Requests exceeding this duration trigger a timeout error. |
Retry on Failure
Enabled by default. Automatically retries failed requests. When disabled, failures result in immediate errors.
| Parameter | Range | Default | Description |
|---|---|---|---|
| Max Retries | 1–10 | 5 | Maximum number of retries upon failure. |
| Retry Interval | 300–10,000 ms | 300 | Delay between retry attempts. |
Error Handling
Disabled by default. When enabled, allows custom logic for handling errors.
| Option | Description |
|---|---|
| Default Value | Outputs a predefined fallback value when an error occurs. |
| Error Branch | Routes execution to a dedicated error-handling branch. Requires configuring downstream nodes within that branch. |
Node Outputs
Stores the API response in variables for use by subsequent nodes.
| Variable Name | Type | Description |
|---|---|---|
result | Object | The raw API response—default output variable. Use the JSON Schema generator to quickly define its structure. Supports multiple output variables and nested sub-variables under Object. Supported types: Array, Object, File, String, Number, Boolean. |
errorMessage | String | Contains error details. Only available when error handling is enabled and the Error Branch option is selected. |
Common Patterns
| Paired Node | Typical Use Case |
|---|---|
| Start Node → API Node | Accepts user input as API request parameters. |
| API Node → LLM Node | Passes API response data as context input to an LLM node. |
| API Node → Conditional Node | Branches logic based on API response values. |
| Loop Node → API Node | Makes bulk API calls to process multiple items. |
Frequently Asked Questions
How do I ensure the API node can successfully reach the target service?
Add the Bailian application service IP addresses (47.93.216.17 and 39.105.109.77) to your target server’s security group or firewall inbound allowlist.