
Node Inputs
- Method: HTTP method for the request.
- Type:
Dropdown
- Options:
GET
,POST
,PUT
,DELETE
,PATCH
- Type:
- URL: The URL of the API endpoint.
- Type:
Text
- Type:
- Headers: Key-value pairs for HTTP headers.
- Type:
Table
- Columns: Key (
Text
), Value (Text
)
- Type:
- Query Parameters: Key-value pairs for query parameters.
- Type:
Table
- Columns: Key (
Text
), Value (Text
)
- Type:
- Body: The body of the request.
- Type:
Table
- Columns: Key (
Text
), Value (Text
)
- Type:
- Content-Type: The content type for the request body.
- Type: Radio Buttons
Node Outputs
- Output: The data received from the API call.
- Type:
Text
- Example usage:
{{api_0.output}}
- Type:
Considerations
- Error Handling: If the API call fails, the node can handle errors gracefully and pass error details downstream.
- Raw JSON Body: If selected, the request body will be sent as raw JSON with Content-Type: application/json.
- Default Headers: Automatically includes a Content-Type: application/json header for raw JSON requests if no such header is set manually.
- Data Validation: Ensure that all required fields (e.g., URL and method) are populated before executing the node.
Examples
Example 1: Retrieving data from an API
The below example is a pipeline which uses the API Node to retrieve data from an API.- Text Node: The API key .
- Text:
your_api_key
- Text:
- API Node: Retrieves data from an API
- Method:
GET
- URL:
https://api.vectorshift.ai/v1/pipelines
- Headers
- Key:
Authorization
- Value:
Bearer {{text_0.text}}
- Key:
- Query Parameters
- Key:
verbose
- Value:
true
- Key:
- Method:
- Output Node: Outputs the data received from the API call.
- Output:
{{api_0.output}}
- Output:

Example 2: Sending data to an API
The below example is a pipeline which uses the API Node to send data like (e.g., a file or text) to an API.- Text Node: The API key .
- Text:
your_api_key
- Text:
- File Node: The file to be sent to the API.
- File:
Example File
The file created in the Text to File node example.
- File:
- API Node: Sends the file and text to the API.
- Method:
POST
- URL:
https://api.vectorshift.ai/v1/pipeline/[pipeline_id]/run
- Headers
- Key:
Authorization
- Value:
Bearer {{text_0.text}}
- Key:
- Body
- Key:
inputs.input_0
- Value:
Sample Text
- Key:
inputs.input_1
- Value:
{{file_0.file}}
- Key:
- Method:
- Output Node: Outputs the data received from the API call.
- Output:
{{api_0.output}}
- Output:
