pay_l402_api
Make HTTP requests to paid APIs and automatically handle L402 or X402 payments when a 402 response requires it.
Instructions
Make a request to a paid API. Supports L402 (Lightning) and X402 (USDC on Base) protocols. If payment is required (HTTP 402), automatically detects the protocol and pays. L402 is preferred when both are available. Works with an operator key (pays from the operator wallet; a default agent is provisioned automatically) or an agent key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to request | |
| body | No | Request body for POST/PUT requests | |
| method | No | HTTP method | GET |
| max_payment_sats | No | Maximum amount in satoshis to pay for this request |