minia2a_call_service
Calls an x402 service on minia2a.uk, signing wallet trials or paying USDC on Base when a 402 response appears; set autoPay with a private key to pay and retry automatically.
Instructions
Call an x402 service on minia2a.uk. Three access paths: (1) omit everything for the paid 402 path (sign a wallet for 5 free trial calls — no registration); (2) pass privateKey (or set MINIA2A_PRIVATE_KEY) for your wallet's own 5 trials — the key never leaves this process, it only signs the per-call trial message; (3) when both are exhausted the endpoint returns HTTP 402 with a machine-readable accepts[] array — pay in USDC and retry with a PAYMENT-SIGNATURE header (x402 V2). Set autoPay:true together with privateKey to have a 402 paid automatically in USDC on Base and the call retried — the wallet must hold USDC or the call still returns payment_required (never charges silently). Note that wallet= on its own does NOT reach the wallet bucket; the signature is what does. Service parameters go INSIDE params; a top-level key that is not one of the five declared names is rejected by name rather than dropped.
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": {
"serviceId": "<serviceId>"
},
"name": "minia2a_call_service"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | JSON parameters to send to the service. These are the service's OWN parameter names (e.g. {"ext":"json"} for x402-mime-type), nested here — not flattened onto the top level. | |
| wallet | No | Your self-custody wallet address (0x...). Without privateKey this alone does not draw on the wallet's trial bucket. | |
| autoPay | No | When true and a privateKey is available, a 402 Payment Required response is paid automatically in USDC on Base via x402 and the call retried. Default false — you get a payment_required response instead of any automatic charge. Empty wallet (no USDC) still returns payment_required. | |
| serviceId | Yes | The service ID (e.g., 'x402-gas') or full endpoint path | |
| privateKey | No | Private key of your wallet, used locally to sign the trial message (EIP-191). Never transmitted — only the resulting signature is sent. Falls back to the MINIA2A_PRIVATE_KEY env var. |