Skip to main content
Agent commands. Your AI agent uses this node in workflows. You don’t configure it directly.
The HTTP node makes requests to APIs and web services. It supports all standard HTTP methods, handles JSON and binary responses, and includes authentication options.

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

{
  "nodes": [
    {
      "id": "fetch",
      "type": "http",
      "params": {
        "url": "https://api.example.com/users"
      }
    }
  ]
}

POST with JSON body

{
  "nodes": [
    {
      "id": "create",
      "type": "http",
      "params": {
        "url": "https://api.example.com/users",
        "body": {
          "name": "John",
          "email": "john@example.com"
        }
      }
    }
  ]
}

With authentication

{
  "nodes": [
    {
      "id": "fetch_protected",
      "type": "http",
      "params": {
        "url": "https://api.example.com/private",
        "auth_token": "${api_token}"
      }
    }
  ]
}

With query parameters

{
  "nodes": [
    {
      "id": "search",
      "type": "http",
      "params": {
        "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

{
  "nodes": [
    {
      "id": "download",
      "type": "http",
      "params": {
        "url": "https://example.com/image.png"
      }
    },
    {
      "id": "save",
      "type": "write-file",
      "params": {
        "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