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}/sanctionsGET$0.003Screen against OFAC, FATF, JFSA, and ScamDB sanctions lists
/x402/api/address/{address}/risk-scoreGET$0.008AML risk score (76+ detectors, ML anomaly, 5 chains)
/x402/api/tx/{tx_hash}/coinjoinGET$0.01Detect CoinJoin, mixing, and tumbling patterns
/x402/api/tx/{tx_hash}/traceGET$0.015Transaction flow tracing with ML anomaly detection
/x402/api/wallet/{address}/clusterGET$0.02Neo4j graph clustering of related addresses
/x402/api/batch/screeningPOST$0.05Batch AML screening for up to 50 addresses

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.

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_WALLET_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

© 2026 ChainAnalyzer. All rights reserved.