Connecting External APIs (HTTP)

How to connect external APIs to your workflow with secure authentication. Bearer auth, Basic auth, timeouts, x402 payments, and limitations explained.

Written By pvdyck

Last updated 16 days ago

Connecting External APIs

βœ… Supported β€” Custom implementation with known limitations (see below)

n8n docsHTTP Request node documentation
AuthNone, Bearer, Basic, or Predefined Credential Type via Secure Vault

Compatibility

FeatureStatus
GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONSSupported
JSON, Form-Urlencoded, Raw bodySupported
Bearer and Basic auth (via Secure Vault)Supported
Pagination (offset-based, next-URL)Supported
Batching (parallel execution)Supported
Retry on 429/5xxSupported (3 retries, linear backoff)
ContinueOnFailSupported
x402 payment protocolSupported (automatic β€” see below)
OAuth2 / Digest authNot supported β€” use Bearer or Basic instead
ProxyNot supported β€” platform constraint
SSL/TLS client certificatesNot supported β€” platform managed TLS only
Streaming responseNot supported β€” full response in memory
Binary filesIn-memory only β€” base64, ~50MB limit
Header AuthNot supported β€” blocked at deploy. Use a Predefined Credential Type instead (see below)
Query AuthNot supported β€” blocked at deploy. Use a Predefined Credential Type instead (see below)
Default timeout10 seconds (vs n8n's 300s)
Body on GET/HEADConverted to query parameters
Pagination expressionsSimplified β€” $response.body.*, $response.headers.*, $pageCount + arithmetic only

Header Auth and Query Auth

"Header Auth" and "Query Auth" under Generic Credential Type are not supported and will be rejected when you deploy your agent. These credential types let you enter a custom header or query parameter name, but the platform cannot honor that name due to its security architecture (API keys are stored externally and injected by the proxy with fixed names).

Use Predefined Credential Type instead. Select the credential that matches your API β€” each one has the correct authentication header already configured. For example, to call the Gemini REST API, select "Google Gemini" as the Predefined Credential Type.

Bearer Auth and Basic Auth under Generic Credential Type are supported β€” they use standard Authorization headers.

If no predefined credential exists for your API, let us know and we'll add it.

Automatic x402 Payments

When your HTTP Request node calls an API that uses the x402 payment protocol, indie.money handles payment automatically. You don't need to configure anything β€” it just works.

How it works:

  1. Your workflow calls an x402-enabled API
  2. The API responds with a payment request (HTTP 402)
  3. indie.money automatically pays the requested amount from your agent's wallet
  4. The request is retried with proof of payment
  5. You receive the API response as normal

What gets charged:

  • The payment amount is deducted from your agent's wallet balance
  • Both InUSD (0% fee) and USDC are supported β€” InUSD is preferred automatically
  • The cost appears in your execution history alongside any other API costs

When it applies:

  • Calling external x402-enabled APIs (AI services, data providers, other indie.money agents)
  • Calling other indie.money agents via their webhook URL
  • Any HTTP endpoint that returns an x402 payment challenge

Budget protection:

  • Your agent's wallet balance is checked before paying β€” if the balance is insufficient, the node returns an error instead of paying
  • The API cost ceiling you set for your agent still applies β€” x402 costs count toward the ceiling
  • Each payment is tracked and visible in your execution details

Example: An AI agent workflow that calls an external x402 language model API:

Webhook trigger β†’ Process input β†’ HTTP Request (x402 API) β†’ Format output                                       ↑                                  Payment handled                                  automatically

No payment code needed in your workflow. The platform handles the payment negotiation transparently.

Status

This integration is available but has not yet been independently validated on indie.money. If you encounter issues, please report them.