Skip to main content
工作流应用

API Node

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.

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.
ParameterDescription
HTTP MethodSelect the HTTP request method: GET, POST, PUT, PATCH, or DELETE. Default is GET.
URLEnter the full API endpoint URL. Supports direct input or variable references (e.g., ${upstream.output}) to dynamically insert outputs from upstream nodes.

Headers

ColumnDescription
KeyHeader name, e.g., Authorization, Content-Type.
Reference ModeChoose Reference (to reuse existing variables) or Input (to enter a literal value).
ValueHeader value—select a variable or type a static value based on the reference mode.
Click Add Variable to define multiple headers.

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.
ColumnDescription
KeyParameter name, e.g., limit, page, sort.
Reference ModeChoose Reference (to reuse existing variables) or Input (to enter a literal value).
ValueParameter value—select a variable or type a static value based on the reference mode.
Click Add Variable to define multiple query parameters.

Request Body

Select the body type according to your API’s requirements:
TypeDescription
noneNo request body—suitable for GET requests.
form-dataFor form submissions or file uploads; displays a key-value configuration table.
rawDefault option. Plain text input (e.g., plain text, XML).
JSONAuto-formatted JSON editor.

Timeout Settings

Set the maximum time to wait for a response before timing out.
ParameterRangeDefaultDescription
Timeout1–120 seconds5Requests exceeding this duration trigger a timeout error.

Retry on Failure

Enabled by default. Automatically retries failed requests. When disabled, failures result in immediate errors.
ParameterRangeDefaultDescription
Max Retries1–105Maximum number of retries upon failure.
Retry Interval300–10,000 ms300Delay between retry attempts.

Error Handling

Disabled by default. When enabled, allows custom logic for handling errors.
OptionDescription
Default ValueOutputs a predefined fallback value when an error occurs.
Error BranchRoutes 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 NameTypeDescription
resultObjectThe 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.
errorMessageStringContains error details. Only available when error handling is enabled and the Error Branch option is selected.

Common Patterns

Paired NodeTypical Use Case
Start Node → API NodeAccepts user input as API request parameters.
API Node → LLM NodePasses API response data as context input to an LLM node.
API Node → Conditional NodeBranches logic based on API response values.
Loop Node → API NodeMakes 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.