HTTP/1.1 402 PAYMENT REQUIRED agent402.base.eth · BASE · SOLANA · POLYGON · ARBITRUM · MONAD · CELO · AVALANCHE · SEI · OPTIMISM · STELLAR · ALGORAND · ROBINHOOD · USDC · USDG

Quickstart.

Add 527 deterministic tools - plus an open cross-seller Index, Smart Order Router, and an OpenAI-compatible /v1 gateway - to your agent in about a minute. No signup, no API key - start free with proof-of-work, settle USDC on Base (or Solana, Polygon, Arbitrum, Monad, Celo, Avalanche, Sei, Optimism, Stellar, Algorand - or USDG on Robinhood Chain) when you scale.

terminal
# one file, zero deps - pays with COMPUTE (no wallet)
curl -s https://agent402.tools/demo.js -o demo.js
node demo.js

# or settle USDC on Base (or Solana, Polygon, Arbitrum, Monad, Celo, Avalanche, Sei, Optimism, Stellar, Algorand - or USDG on Robinhood Chain) with a funded key
npm i @x402/core @x402/evm @x402/fetch viem
AGENT_KEY=0xYOUR_FUNDED_KEY node demo.js

// an autonomous buyer discovers the catalog, gets quoted over HTTP 402, settles, and uses the result - zero humans.

How payment works.

01Your agent calls a paid endpoint and receives HTTP 402 Payment Required with the price and payment details.
02An x402 client (@x402/fetch, axios, or any framework adapter) signs a USDC payment from its wallet and retries.
03Payment settles on Base in seconds and the response comes back. Total overhead: one round trip.

Three ways in.

A / MCP - Claude & any MCP client
# Claude Code - no signup, no API key
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest

# or paste the hosted connector (Settings → Connectors)
https://agent402.tools/mcp
B / x402 client - pay in code
import { wrapFetchWithPayment } from "@x402/fetch";
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/extract", {
  method: "POST", body: JSON.stringify({ url })
});
C / SDK - resolves a task & pays automatically
npm install agent402-client
import { Agent402 } from "agent402-client";
const a = new Agent402();           // free tier (proof-of-work)
const out = await a.call("hash", { text: "hello", algo: "sha256" });

Free tier - proof-of-work.

222 of the 527 pure-CPU tools work with no wallet. Instead of paying USDC, your machine solves a short sha256 puzzle - a fraction of a second of CPU - and the call goes through. Nothing here consumes AI tokens.

GET /api/pow → returns a challenge; solve and resubmit. Free, rate-limited.

/v1 - OpenAI-compatible LLM gateway.

Point any OpenAI SDK at base_url https://agent402.tools/v1 and pay per call in USDC over x402 - no API key, no signup, same wallet-is-the-identity model as every other tool. Chat has five quality tiers ($0.003 nano to $0.50 premium) plus a $0.01 auto tier that routes on your prompt with no model required; embeddings are $0.002 with a default-on cache; image generation is $0.08 per image.

POST/v1/chat/completions$0.02 · base tier ($0.003–$0.50 across the nano…premium paths)
POST/v1/auto/chat/completions$0.01 · model optional, auto-routed
POST/v1/embeddings$0.002 · free repeat within 10 min
POST/v1/images/generations$0.08 per image
POST/v1/audio/speech$0.06 · mp3/pcm bytes out

Reference endpoints.

GET/api/pricingmachine-readable catalog
GET/openapi.jsonfull OpenAPI 3.1 spec
GET/api/statslive counts & receiving wallet
POST/api/extract$0.010 · url → clean markdown
GET/llms.txtagent-readable site map