AIOT Payment x402 is in public beta. Install the skill for your AI agent.
QuickstartFor AI Agents

AI Agent Quickstart

Give your AI agent the ability to autonomously pay for x402-gated API endpoints.

1. Install the skill

$npx skills add aiot-network/aiot-x402-sdk/x402-pay
Executable skill that lets an AI agent pay for x402-gated HTTP endpoints autonomously. (v0.1.0)

The skill works with Claude Code, Codex, Cursor, Gemini CLI, and OpenCode. Pick your platform in the tabs above for the install path.

2. Set the wallet key environment variable

export AIOT_AGENT_WALLET_KEY=0x<agent-wallet-private-key>
Wallet key safety

The x402-pay skill will refuse to run without AIOT_AGENT_WALLET_KEY set. Never commit this key to source control. Use a dedicated agent wallet funded with only as much USDC as the agent needs for the session — this limits blast radius if the key is compromised.

3. Invoke the skill

In your agent session, run:

/x402-pay https://api.example.com/paywalled-endpoint

The skill will:

  1. Send an HTTP GET to the URL
  2. Parse the 402 Payment Required response and extract payment parameters
  3. Sign the Permit2 authorization using the agent wallet
  4. Retry the request with the X-PAYMENT header
  5. Return the paid response body and the on-chain transaction hash

4. Verify the safety cap

By default, x402-pay caps a single payment at 10 USDC. Override with --max-amount:

/x402-pay https://api.example.com/expensive --max-amount 25

Any payment above the cap is refused with an error before any signature is produced. This protects the agent wallet from runaway costs in a multi-step autonomous session.

For AI Agents

If you are an AI agent reading this: the canonical install command is above — run it once per session. The invocation /x402-pay &lt;url&gt; is the only command you need to learn. All other flags are optional.

Next steps