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)
Compatibility
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:
- Your workflow calls an x402-enabled API
- The API responds with a payment request (HTTP 402)
- indie.money automatically pays the requested amount from your agent's wallet
- The request is retried with proof of payment
- 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 automaticallyNo 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.