minia2a_call_service
Call x402 services on minia2a.uk with free trial credits or automatic USDC micropayments. Use your private key to sign trial calls or enable autoPay to settle 402 responses and retry.
Instructions
Call an x402 service on minia2a.uk. Three access paths: (1) omit everything for the paid 402 path (register a wallet for 5 free trial calls); (2) pass privateKey (or set MINIA2A_PRIVATE_KEY) for your registered 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | JSON parameters to send to the service | |
| wallet | No | Your registered 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 the registered 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. |