Agent quickstart
h402 exposes every capability behind one task-first proxy. Your agent calls it, pays per call in Base USDC over x402, and gets a canonical response.
1. Discover a route
Browse the catalog or query it programmatically. Routes are task-first: category/action.
curl https://h402-test.hunt.town/api/catalog
2. Call & pay
POST to the proxy path. The first call returns a 402 with an x402 PAYMENT-REQUIRED challenge; sign it and retry to get the result.
# With the CLI (handles signing for you)
h402 call web/search --json '{"query":"agent payments","numResults":5}'# Raw HTTP
curl -X POST https://h402-test.hunt.town/api/proxy/web/search \
-H 'content-type: application/json' \
-H 'idempotency-key: <uuid>' \
-d '{"query":"agent payments"}'
# -> 402 PAYMENT-REQUIRED, then retry with PAYMENT-SIGNATURE3. Best route, automatically
You call the task, not a provider. h402 routes each call to the best candidate by live quality-adjusted price. Pin a specific provider with ?provider= if you need determinism.
Install the CLI
npm i -g @h402/cli
h402 wallet create --name agent
h402 call web/search --json '{"query":"..."}'The CLI is open source and non-custodial — keys stay in your local wallet.
Building a capability instead?
List your x402 endpoint and earn from the volume you win.