Quickstart.

Add 609 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 - hosted flagship MCP (search/answer first)
claude mcp add --transport http agent402 https://agent402.tools/mcp

# Claude Code - npm with wallet (paid tools settle via x402)
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest

# Cursor - ~/.cursor/mcp.json
{
  "mcpServers": {
    "agent402": { "url": "https://agent402.tools/mcp" }
  }
}

# Smithery - paste at smithery.ai/new
https://agent402.tools/mcp

Every other host, each block read from its own docs: VS Code, Windsurf, Cline, Roo Code, OpenAI Codex CLI, Gemini CLI, Continue, ElizaOS, Bedrock AgentCore, any OpenAI or Anthropic SDK. Shortlinks: agent402.sh/cursor, agent402.sh/vscode, agent402.sh/codex; one-shot install curl -fsSL agent402.sh/install | sh.

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.

The 168 pure-CPU tools (of 609 in the catalog) 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 flat 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. A flat-tier answer carries agent402_metered whenever the same body would have been materially cheaper on the metered route, with the two figures and the endpoint to point at.

POST/v1/metered/chat/completionsfrom $0.001 · quoted per request from its body, settles what the call used under that quote
POST/v1/metered/messagesfrom $0.001 · the same quote-then-settle-actual pricing on the Anthropic Messages wire
POST/v1/metered/responsesfrom $0.001 · the same pricing on the OpenAI Responses wire (Agents SDK, Codex CLI)
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

Decide - a plan for any job.

Describe a job and get a call-ready plan over this catalog and indexed x402/MPP sellers with a recent live 402. Each step names its tool, endpoint, price and fallbacks, with params that validate against the tool's input schema. Needs no indexed tool covers come back as gaps.

Every candidate is scored by one formula with the same weights: fit, observed reliability, price, schema quality and a freshness pass mark, with no term for who sells the tool. An outside tool is eligible when a live 402 was seen in the last 7 days and its input schema is known. Every tool in a plan carries firstParty, so you always see whose tool it is.

The decide fee comes back as a credit, valid 24 hours, toward running that plan with /api/decide/execute. First-party steps run at list price; third-party steps are bought from the seller and resold at the seller's price plus a 5% markup. Spend stops at your budget, and any unspent amount returns as credit until the decision's window closes.

POST/api/decidequick $0.005 · plan $0.02 · full $0.05
POST/api/decide/executeplan budget less credit
POST/api/decide/feedbackfree

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