gateway_register
Seller side: put your HTTP endpoint behind an L402 paywall on our gateway. Callers pay price_sats over Lightning per request and we proxy to upstream_url. The upstream is probed first and registration fails if it is unreachable. Registering does not spend funds. REQUIRES OPERATOR 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": {
"name": "<name>",
"upstream_url": "<upstream_url>",
"price_sats": "<price_sats>"
},
"name": "gateway_register"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Public name of the paid endpoint, up to 100 characters, for example Weather Forecast API | |
| category | No | Catalog category, for example data, finance or ai | |
| price_sats | Yes | Price per call in satoshis (sats, not msats), integer 1 or more, for example 50 | |
| description | No | What buyers get for each paid call, up to 500 characters | |
| upstream_url | Yes | Public https URL of the endpoint to sell, for example https://api.example.com/v1/data. Private and localhost addresses are refused | |
| upstream_method | No | HTTP method used to call your upstream URL. Default GET | GET |
| upstream_headers | No | Extra HTTP headers sent to your upstream, as a JSON object of header name to value, for example {"X-Api-Key": "secret"} | |
| upstream_timeout_ms | No | Upstream timeout in milliseconds, 1000 to 30000, for example 10000 |