Quickstart.

Add 625 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, Arc, Stellar, Algorand - or USDG on Robinhood Chain) when you scale.

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

# or settle USDC on Base with a funded EVM key (four packages, same file)
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.

The demo signs on the EVM rails. To pay on Solana, Stellar or Algorand, see Paying with x402.

Why pay here: what is different, each point with its proof, is on the home page.

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-chain (Base or any rail the 402 offers) and the response comes back. Total overhead: one extra round trip.

Three ways in.

A / MCPClaude & any MCP client
# Claude Code - hosted connector (no install; free proof-of-work tools, paid tools need a wallet client)
claude mcp add --transport http agent402 https://agent402.tools/mcp

# Claude Code - npm server with a funded EVM key (paid tools settle via x402)
claude mcp add agent402 -s user -e AGENT_KEY=0xYOUR_FUNDED_KEY -- npx -y agent402-mcp@latest

# Cursor - ~/.cursor/mcp.json
{
  "mcpServers": {
    "agent402": { "url": "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 clientpay in code
// npm i @x402/core @x402/evm @x402/fetch viem
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false);  // your own code bounds spend
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/extract", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ url: "https://example.com" })
});
console.log(await res.json());
C / SDKresolves 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 170 pure-CPU tools (of 625 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/challenge?slug=<tool>returns a challenge; solve it and resend the call with X-Pow-Solution; 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. These routes are model-backed. 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
and 43 more /v1 routesevery /v1 route with its price

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.003 · plan $0.01 · full $0.03
POST/api/decide/executeplan budget less credit
POST/api/decide/feedbackfree

Examples.

Tasks an agent can run here, from overnight research to daily monitoring. Each one names the calls it makes and what they cost at today's per-call prices, read from the live catalog.

Research 50 public companies overnight

An analyst's agent walks 50 tickers, pulling filings, reported financials, the latest close and price history for each, and leaves 50 structured summaries ready for review in the morning.

Tools: edgar-filings, edgar-company-facts, stock-quote, stock-history

Cost at list price: $0.80 for 50 companies 50 × edgar-filings at $0.00550 × edgar-company-facts at $0.00550 × stock-quote at $0.00150 × stock-history at $0.005

Check a domain's security posture

A security team's agent reads a vendor's domain in one pass: DNS records, TLS certificate, WHOIS, HTTP headers, SPF and robots.txt.

Tools: dns, tls-cert, whois, http-check, spf-check, robots-check

Cost at list price: $0.01 per domain 1 × dns at $0.0011 × tls-cert at $0.0011 × whois at $0.0051 × http-check at $0.0011 × spf-check at $0.0011 × robots-check at $0.001

Extract 200 PDF invoices to text

A procurement agent converts 200 supplier invoices from PDF to markdown, then parses line items, totals and dates into structured JSON for reconciliation.

Tools: pdf-to-markdown

Cost at list price: $0.60 for 200 invoices 200 × pdf-to-markdown at $0.003

Watch competitor pricing daily

A pricing agent reads 40 product pages every morning (render for the 20 JavaScript-heavy ones, extract for the 20 static ones, both returning markdown it scans for prices) and logs changes to its wallet-keyed memory for trend analysis.

Tools: render, extract, memory-write

Cost at list price: $0.42 per day 20 × render at $0.0120 × extract at $0.0120 × memory-write at $0.001

Build a macro dashboard from government data

A research agent assembles a US economic snapshot: CPI year-over-year, unemployment, the Fed funds rate, the Treasury yield curve and FX rates, from official feeds, with no API keys.

Tools: cpi-yoy, unemployment-rate, fed-funds, treasury-yield-curve, fx-dashboard

Cost at list price: $0.025 per snapshot 1 × cpi-yoy at $0.0051 × unemployment-rate at $0.0051 × fed-funds at $0.0051 × treasury-yield-curve at $0.0051 × fx-dashboard at $0.005

Answer customer questions with live web search

A support agent searches the live web for product documentation, gets a cited, model-written synthesis from the answer tool (model-backed) and includes the source URLs in its reply.

Tools: search, answer

Cost at list price: $0.09 per question 1 × search at $0.011 × answer at $0.08

Validate an address list and geocode the new rows

An ops agent lints a CSV of 500 customer rows, checks the contact emails and geocodes the 20 new addresses to lat/lng at one call a second, the open geocoder's pace, with no maps API key.

Tools: csv-lint, geocode, email-validate

Cost at list price: $0.521 for 500 rows 1 × csv-lint at $0.00120 × geocode at $0.001500 × email-validate at $0.001

Cross-check SEC insider trades against stock moves

A compliance agent pulls recent insider trades from EDGAR, matches them against the stock's price history and flags trades that preceded large moves.

Tools: edgar-insider-trades, stock-history, stock-quote

Cost at list price: $0.011 per company 1 × edgar-insider-trades at $0.0051 × stock-history at $0.0051 × stock-quote at $0.001

Badges.

Show that a project runs on Agent402: paste a snippet into a README, docs page or site. Each image is served from https://agent402.tools/badges/{style}.svg, so an embed always shows the current badge.

Default

Shields-style badge with the tool count

Default badge
Markdown
[![Agent402](https://agent402.tools/badges/default.svg)](https://agent402.tools)
HTML
<a href="https://agent402.tools"><img src="https://agent402.tools/badges/default.svg" alt="Agent402"></a>

Flat

Flat version without the gradient

Flat badge
Markdown
[![Agent402](https://agent402.tools/badges/flat.svg)](https://agent402.tools)
HTML
<a href="https://agent402.tools"><img src="https://agent402.tools/badges/flat.svg" alt="Agent402"></a>

Powered by

Wider badge for project footers

Powered by badge
Markdown
[![Agent402](https://agent402.tools/badges/powered-by.svg)](https://agent402.tools)
HTML
<a href="https://agent402.tools"><img src="https://agent402.tools/badges/powered-by.svg" alt="Agent402"></a>

Reference endpoints.

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