Back to Docs

x402 USDC Micropayment API

Use ChainAnalyzer's AML tools with no API key and no subscription — pay per request in USDC on Base or Solana. Ideal for AI agents that pay and call autonomously.

What is x402?

x402 is a crypto-native micropayment protocol built on the HTTP 402 Payment Required status code. Clients call the API, get a 402 with payment requirements, sign a USDC payment, retry with the signed header, and receive the response after the Coinbase x402 Facilitator verifies and settles the payment.

Endpoints & pricing

EndpointMethodPriceWhat it does
/x402/api/address/{address}/freeze-statusGET$0.02Current stablecoin issuer freeze / blacklist state per token, with first freeze time and the last event's tx (coverage lists the tokens indexed)
/x402/api/address/{address}/hack-exposureGET$0.05Connection to a known hack: attacker, downstream wallet, or an exchange / service that received stolen funds, with hop distance and lower-bound amounts (published incidents only)
/x402/api/address/{address}/sanctionsGET$0.05Screen against OFAC, FATF, JFSA, and ScamDB sanctions lists
/x402/api/address/{address}/risk-scoreGET$0.10AML risk score (76+ detectors, ML anomaly, 12 chains)
/x402/api/tx/{tx_hash}/coinjoinGET$0.10Detect CoinJoin, mixing, and tumbling patterns
/x402/api/tx/{tx_hash}/traceGET$0.30Transaction flow tracing with ML anomaly detection
/x402/api/wallet/{address}/clusterGET$0.25Neo4j graph clustering of related addresses
/x402/api/batch/screeningPOST$2.50Batch AML screening for up to 50 addresses (fixed price per batch)
/x402/api/hack-exposure/batchPOST$1.00Known-hack exposure for up to 50 addresses (fixed price per batch; verdict and up to 3 incidents each; invalid addresses listed separately)

Payment networks

  • Base (EVM) — USDC on eip155:8453
  • Solana — USDC on mainnet

Settlement on either network takes milliseconds to a few seconds. Fund the agent's wallet with a small USDC balance and it keeps running.

Receiving address

  • Base (USDC): 0xe8e26183736D796d401Df30810207465fa708959
  • Solana (USDC): available only when the 402 response lists Solana in accepts; pay to the payTo given there.
This is the only receiving address (it is the payTo in our 402 responses). You may see zero-value transfers from a different address that looks the same at the start and end (address poisoning). Never copy the address from your transaction history — always pay to the payTo value in the 402 response.

Use it via the MCP server (recommended)

Claude Desktop, Claude Code, Cursor, Windsurf, ChatGPT, Gemini, and any other Model Context Protocol client can call all six tools in natural language through the chainanalyzer-mcp npm package. Add this to claude_desktop_config.json:

{
  "mcpServers": {
    "chainanalyzer": {
      "command": "npx",
      "args": ["-y", "chainanalyzer-mcp"],
      "env": {
        "X402_PRIVATE_KEY": "0x..."
      }
    }
  }
}

See the MCP server launch announcement for details.

Direct HTTP access

If you're wiring this into your own agent framework:

# 1. First request — server returns HTTP 402 with payment requirements
curl -si "https://chain-analyzer.com/x402/api/address/bc1q.../risk-score"

# 2. Sign the x402 payment header with your wallet, then retry
curl -si \
  -H "X-PAYMENT: <signed-payment-header>" \
  "https://chain-analyzer.com/x402/api/address/bc1q.../risk-score"

The x402-axios / x402-fetch SDKs automate signing and retry for you.

Service discovery

Two public URLs return service metadata, all endpoints, and prices:

x402 vs subscription plans

If you're already on Pro or Enterprise, set CHAINANALYZER_API_KEY in the environment and calls draw from your plan's quota instead of x402. Pick the subscription for steady high volume, and x402 for one-off usage or autonomous agent workflows.

Related links

Share this page

© 2026 ChainAnalyzer. All rights reserved.