Skip to main content
Agent commands. Your AI agent uses this node in workflows. You don’t configure it directly.
The HTTP node calls APIs and web services. It handles JSON and binary responses, supports all standard methods, and has built-in auth — so your agent doesn’t need to construct Authorization headers manually.

Parameters

ParameterTypeRequiredDefaultDescription
urlstrYes-API endpoint to call
methodstrNoAutoHTTP method (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
bodydict/strNo-Request payload (dict for JSON, str for raw)
headersdictNo{}Additional HTTP headers
paramsdictNo-Query parameters
timeoutintNo30Request timeout in seconds

Authentication (mutually exclusive)

ParameterTypeDescription
auth_tokenstrBearer token for Authorization: Bearer <token> header
api_keystrAPI key for custom header
api_key_headerstrHeader name for API key (default: X-API-Key)
You cannot use both auth_token and api_key in the same request.

Output

KeyTypeDescription
responseanyResponse data (JSON parsed to dict, text, or base64 binary)
response_is_binarybooltrue if response is base64-encoded binary
status_codeintHTTP status code
response_headersdictResponse headers
response_timefloatRequest duration in seconds
errorstrError description (only for non-2xx responses)

Method auto-detection

If method is not specified:
  • POST if body is provided
  • GET if no body

Response handling

JSON responses are automatically parsed to dict/list. Binary responses (images, PDFs, etc.) are base64-encoded. Detected by Content-Type:
  • image/*, video/*, audio/*
  • application/pdf, application/zip, application/octet-stream
Text responses are returned as strings.

Examples

GET request

### fetch

Fetch users from the API.

- type: http
- url: https://api.example.com/users

POST with JSON body

### create

Create a new user via POST request.

- type: http
- url: https://api.example.com/users
- body:
    name: John
    email: john@example.com

With authentication

### fetch_protected

Fetch data from a protected API endpoint.

- type: http
- url: https://api.example.com/private
- auth_token: ${api_token}

With query parameters

### search

Search the API with query parameters.

- type: http
- url: https://api.example.com/search
- params:
    q: pflow
    page: 1
    limit: 10
Results in: https://api.example.com/search?q=pflow&page=1&limit=10

Download binary file

### download

Download a binary image file.

- type: http
- url: https://example.com/image.png

### save

Save the downloaded file to disk.

- type: write-file
- file_path: downloaded.png
- content: ${download.response}
- content_is_binary: ${download.response_is_binary}

Error handling

HTTP errors (4xx, 5xx) return the error action with details in error key. The response body is still available in response. Network errors trigger automatic retry (3 attempts, 1 second wait):
ErrorMessage
Timeout”Request timed out after X seconds”
Connection failed”Could not connect to URL”
Other”HTTP request failed:

Status codes

ActionCondition
defaultStatus 2xx (success)
errorStatus 4xx/5xx or network failure