purchase_skill
Purchase a skill. Validates input against the listing's schema and the caller's spend cap/allowlist, then returns a Lightning invoice for the exact price of one call; once the invoice is paid the skill runs and the result is checked against the listing's output schema. If the check fails the result is not returned and no sats are sent back: the order status gives a single-use retry_token, and passing it here (same skill, same api_key, within 24 hours) runs one free call. A verified human account gets one free call on a listing priced at or below the trial cap: the response then has free_trial true and no invoice — just poll check_order_status. Every other purchase returns a Lightning invoice. Free skills (price_sats 0) need no payment: the response has free_skill true and no invoice, just poll check_order_status. 'input' (the skill's required input, matching its input schema) is required, and so is a key: pass 'api_key' (your operator API key), or set it once as an 'Authorization: Bearer ' header on this MCP connection. Spend-cap enforcement needs to know which operator is calling. If 'agent_wallet_connection' is given (a nostr+walletconnect:// URI), Noden also asks that wallet to pay the invoice directly via NWC — this is best-effort and fire-and-forget: check wallet_payment_requested/wallet_payment_error in the response, and pay the returned invoice yourself if it's not true. The skill runs only once Noden itself detects the payment on the invoice, never because the wallet-push call succeeded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Input matching the skill's input JSON Schema | |
| api_key | No | Your operator API key. Optional if the connection sends it as an Authorization: Bearer header | |
| skill_id | Yes | ||
| retry_token | No | A retry_token from a failed order of this same skill: runs one free call instead of returning an invoice | |
| agent_wallet_connection | No | Optional nostr+walletconnect:// URI — if given, Noden asks this wallet to pay the invoice |