pay_l402_api
Make a request to a paid API. Supports L402 (Lightning) and X402 (USDC on Base) protocols. Platform fee on the API price: 1%, rounded down, minimum 1 sat, reported as fee in the response. 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "pay_l402_api"
}
}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 |