Pay-per-call API gateway skill — calls 63 APIs (LLMs, image/video gen, flights, hotels, crypto, web search) via x402 micropayments. Each call costs $0.001-$0.60 in USDC/USDm, enforced by a local policy engine with spend caps.
Call 63 paid APIs via x402 micropayments. Each API call costs between $0.001 and $0.60, paid with USDC on Base/Solana or USDm on MegaETH.
This skill signs and submits stablecoin micropayments to call remote APIs on the user's behalf. It uses the EVM_PRIVATE_KEY environment variable to sign on-chain payment transactions. Each call deducts a small amount from the wallet.
Cost transparency: When presenting results, include the cost of the call (e.g. "Bitcoin is $97,500 (cost: $0.001)"). If the user asks about spending, show full budget breakdown.
These environment variables are NOT required. They provide additional controls:
.x402engine-state.json.https://x402engine.app/.well-known/x402.json). Use a self-hosted catalog if you don't trust the default.false to skip policy preflight checks. Enabled by default.All payments go to the payTo address declared in the service catalog. The catalog is fetched from the discovery URL above. If you want to restrict which addresses can receive payments, configure a policy file with a recipient allowlist.
When the user asks "how much budget is left" or similar:
This skill requires Node.js and the following npm packages (declared in package.json):
@x402/fetch — x402 payment-aware fetch wrapper@x402/evm — EVM payment scheme (Permit2 signatures)viem — Ethereum client libraryInstall with: cd skills/x402engine && npm install
POLICY_MISSING, POLICY_INVALIDCHAIN_DENIED, ASSET_DENIED, RECIPIENT_DENIEDPER_TX_EXCEEDED, DAILY_CAP_EXCEEDED, RATE_LIMITEDACTION_DENIEDSERVICE_NOT_FOUNDWALLET_UNDERFUNDED