x402 · USDC on Base · pay-per-call
15 x402 endpoints any agent can discover and pay for
Every endpoint below is live in production and answers 402 Payment Required
with its own payment challenge, settling in USDC on Base per call — no API key, no account. Each one is
registered on x402scan and indexed by Coinbase Bazaar. The exact price is quoted in the challenge itself
and listed in openapi.json.
Data & intelligence · 10
Live market, wallet, token and chain checks served from our own workers on Base.
POST /api/chat
Ask the XH Agents AI Trading Assistant
Market-aware answer to a question about crypto assets, priced per message, with live prices fetched at the moment of the request.
Sample call and response
curl -X POST https://xhagents.xyz/api/chat -H 'Content-Type: application/json' -d '{}'
{"reply":"BTC is trading near …","engine":"xh-chatengine","credits_left":1}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
POST /api/defi-sentiment
Asset and protocol sentiment from public data
Perpetual funding rate, open interest and price trend for an asset (Binance public data) plus protocol TVL change (DefiLlama), combined into a labelled score whose inputs and weights are shown.
Sample call and response
curl -X POST https://xhagents.xyz/api/defi-sentiment -H 'Content-Type: application/json' -d '{}'
{"asset":"BTC","sentiment":"neutral","score":0.08,
"funding_rate_8h_pct":"0.0089","open_interest_usd":412000000,
"protocol_tvl":{"slug":"aerodrome","tvl_usd":380000000,"change_24h_pct":1.1}}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
POST /api/gas-tracker
Base gas right now
Current Base base fee, suggested priority fees (low/medium/high) and USD cost estimates for a plain transfer and an ERC-20 transfer.
Sample call and response
curl -X POST https://xhagents.xyz/api/gas-tracker -H 'Content-Type: application/json' -d '{}'
{"chain":"base","block_number":51880546,"base_fee_gwei":0.005,
"priority_fee_gwei":{"low":0.001,"medium":0.002,"high":0.005},
"usd_estimate":{"transfer_21000":"0.0001","erc20_transfer_65000":"0.0003"}}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
POST /api/kb/ask
Ask the XH Agents knowledge base
Answers a question from 15 curated field notes about running self-hosted infrastructure, x402 payments and agent tooling. Returns the best matching entries.
Sample call and response
curl -X POST https://xhagents.xyz/api/kb/ask -H 'Content-Type: application/json' -d '{}'
{"best_match":{"id":"nginx-docroot","title":"Which docroot does nginx really serve?"},
"matches":3}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
POST /api/payment-verify
Verify a USDC settlement
Verifies that a transaction hash settled a USDC payment on Base to a given recipient, returning the parsed transfer, sender and confirmation count. Matches the Transfer log the way the token contract emits it.
Sample call and response
curl -X POST https://xhagents.xyz/api/payment-verify -H 'Content-Type: application/json' -d '{}'
{"tx_hash":"0x3ddcb67f…","verified":true,"reason":"ok",
"transfer":{"from":"0x85fc53d6…","to":"0x6cb53f00…","value_atomic":2000000,"block":51825798}}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
POST /api/token-check
Check an ERC-20 token on Base
ERC-20 metadata, EIP-1967 proxy detection and free DEX liquidity/volume data, plus an explicit list of the checks that were NOT performed (no honeypot simulation, no holder concentration).
Sample call and response
curl -X POST https://xhagents.xyz/api/token-check -H 'Content-Type: application/json' -d '{}'
{"token":"0x833589fcd…","is_contract":true,"name":"USD Coin","symbol":"USDC",
"decimals":6,"is_proxy":false,"dex":{"liquidity_usd":296000000.0},
"not_checked":["honeypot simulation","holder concentration"]}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
POST /api/wallet-profile
Profile an address on Base
Balances, contract status, nonce, recent USDC activity and known-address labels for any Base address. States its window and what it could not check.
Sample call and response
curl -X POST https://xhagents.xyz/api/wallet-profile -H 'Content-Type: application/json' -d '{}'
{"address":"0x6cb53f00…","chain_id":8453,"is_contract":true,
"balance_usdc":"2.000000","nonce":1,"recent_usdc_transfers":6}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
POST /api/whale-watch
Large recent transfers on Base
Scans the last blocks for USDC or WETH transfers above a USD threshold and returns the largest movements with direction, counterparties and labels. Pending mempool visibility requires a node with txpool access, which is stated rather than faked.
Sample call and response
curl -X POST https://xhagents.xyz/api/whale-watch -H 'Content-Type: application/json' -d '{}'
{"token":"USDC","blocks_scanned":200,"threshold_usd":50000.0,"events_found":1240,
"largest":[{"amount":1250000.0,"from":"0x…","to":"0x…","tx_hash":"0x…"}]}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
POST /api/x402-check
Conformance report for any x402 endpoint
Fetches any x402 endpoint, decodes its 402 challenge and reports conformance: version, accepts fields, atomic amount, PAYMENT-REQUIRED transport and bazaar metadata, with the price and payTo extracted. Refuses private and loopback targets.
Sample call and response
curl -X POST https://xhagents.xyz/api/x402-check -H 'Content-Type: application/json' -d '{}'
{"url":"https://xhagents.xyz/api/kb/ask","reachable":true,"status":402,
"conformant":true,"x402Version":2,"failed_checks":[]}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
POST /api/x402-directory
Search the x402 ecosystem
Searches Coinbase Bazaar (authenticated discovery) and the public x402-list directory at once, merges results by URL and returns endpoints with price, network, payTo and description — so an agent can find a service it did not already know.
Sample call and response
curl -X POST https://xhagents.xyz/api/x402-directory -H 'Content-Type: application/json' -d '{}'
{"query":"gas","sources":{"coinbase-bazaar":"ok","x402-list":"ok"},"results":5,
"endpoints":[{"url":"https://xhagents.xyz/api/gas-tracker","sources":["coinbase-bazaar","x402-list"]}]}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
Knowledge products · 1
Everything we learned shipping this, delivered in one call.
POST /api/compute/xh-bundle
XH Agents — Build & Ship an x402 Paid API
Thirteen playbooks from running paid x402 endpoints in USDC on Base: shipping the endpoint, the payment-verifier rules, the real-money buyer test, the Base RPC capability audit, CDP authentication, directory registration, consolidating Cloudflare/Solana data, an rclone Google Dri
13 playbooks in one call
Sample call and response
curl -X POST https://xhagents.xyz/api/compute/xh-bundle -H 'Content-Type: application/json' -d '{}'
{"bundle":"XH Agents — Build & Ship an x402 Paid API","version":"1.0.0",
"items_total":13,"items_returned":13,
"items":[{"id":"ship-x402-endpoint","title":"Ship a new x402 paid endpoint end to end"}]}
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
How-to playbooks · 4
Step-by-step SOPs with the commands and the failures behind them.
GET · POST /api/howto/create-x402-endpoint
Build an x402 paid endpoint that passes the validator, gets indexed and takes real USDC
End-to-end recipe for turning any HTTP capability into an x402 endpoint that an unknown agent can find, pay for and consume: the payment gate, the verifier rules, per-route pricing, the concurrency traps, the nginx wiring, the discovery surface, plus the money-path bugs we only f
15 steps · 10 documented pitfalls
Sample call and response
curl -X POST https://xhagents.xyz/api/howto/create-x402-endpoint -H 'Content-Type: application/json' -d '{}'
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
GET · POST /api/howto/vps-gdrive-connect
Connect a headless VPS to a user's Google Drive (rclone, no browser on the server)
Give a server permanent, scriptable access to someone else's Google Drive: one interactive authorisation on a machine with a browser, then bidirectional sync from the server forever. This is the exact flow we use for both a personal Drive bridge and a scheduled VPS backup.
9 steps · 8 documented pitfalls
Sample call and response
curl -X POST https://xhagents.xyz/api/howto/vps-gdrive-connect -H 'Content-Type: application/json' -d '{}'
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
GET · POST /api/howto/x402-register
Register an x402 endpoint so agents can find and pay it (x402scan + Coinbase Bazaar)
The complete discovery path for an x402 endpoint: publish machine-readable discovery documents, pass the official validator, list on x402scan, understand what actually triggers Coinbase Bazaar indexing, and prove the listing exists from the registry's own API instead of a success
13 steps · 10 documented pitfalls
Sample call and response
curl -X POST https://xhagents.xyz/api/howto/x402-register -H 'Content-Type: application/json' -d '{}'
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
GET · POST /api/howto/youtube-auto-ai
YouTube Shorts automation with AI: queue → render → upload → notify
A 3x/day pipeline that takes product photos from Google Drive, renders a 720x1280 Shorts video with Ken Burns motion, uploads it to YouTube via the Data API v3, updates a static showcase page and reports to Telegram. Every step below ran in production; the numbers are the ones we
12 steps · 9 documented pitfalls
Sample call and response
curl -X POST https://xhagents.xyz/api/howto/youtube-auto-ai -H 'Content-Type: application/json' -d '{}'
An unpaid call answers 402 with the payment challenge; the price is
quoted there and in openapi.json.
Secondary hosts · 2
Older endpoint sets we keep online: Cloudflare edge and Solana.
x402 x402-cf-worker.mulberry-boar.workers.dev
b0x402 — Cloudflare Worker
The original x402 seller experiment at the edge: meme signals, DeFi sentiment, market equilibrium and wallet profiling.
Endpoints on this host
/v1/meme-hunter/v1/defi-sentiment/v1/dinalibrium/v1/wallet-profile/health
Kept online as a secondary endpoint set. The registered catalogue is the VPS-hosted API.
x402 pronomad.duckdns.org
b0x402 — Solana (pronomad)
The same idea on Solana mainnet: token radar and honeypot checks, settled in USDC on Solana.
Endpoints on this host
/v1/meme-hunter/v1/defi-sentiment/v1/dinalibrium/v1/wallet-profile/v1/honeypot-check
Secondary chain, listed so an agent knows a Solana rail exists; Base is the primary catalogue.
How an agent pays
- Call an endpoint with no credentials; it answers
402 with the price, the network
(eip155:8453), the asset (USDC) and the receiving address.
- Sign an EIP-3009 transfer authorisation for that amount — the payer needs USDC only, the
facilitator pays the gas.
- Repeat the request with the signed authorisation in the
X-PAYMENT header.
- The endpoint returns
200 with the answer plus a PAYMENT-RESPONSE
settlement header you can verify on-chain. A call that fails is never charged.
Back to the main site · free SOP index /api/howto
· discovery openapi.json and /.well-known/x402.