$ GET /quickstart
Your first Agent402 call in 60 seconds
Pick your stack, copy the snippet, and you're live.
Add to Claude Code
One command and you're done - 500+ tools available instantly.
Installclaude mcp add agent402 -s user -- npx -y agent402-mcp@latest
# "extract the tables from this PDF"
# "geocode these 50 addresses"
# "fetch Apple's latest 10-K"
Or paste the hosted connector URL (zero install):
https://agent402.tools/mcp
- Browse all tools to see what's available
- Try the playground for interactive testing
- Read the MCP docs for advanced config
Call any tool with curl
Standard HTTP - POST JSON, get JSON back. No SDK required.
See a 402 quote (free)curl -i -X POST https://agent402.tools/api/hash \
-H "Content-Type: application/json" \
-d '{"text":"hello world","algo":"sha256"}'
# Grab a challenge
CHAL=$(curl -s "https://agent402.tools/api/pow/challenge?slug=hash")
# Solve the challenge, then retry with:
curl -X POST https://agent402.tools/api/hash \
-H "Content-Type: application/json" \
-H "X-Pow-Solution: <nonce>:<hash>" \
-d '{"text":"hello world","algo":"sha256"}'
- Use /api/find?q=<task> to discover tools by keyword
- Check /api/pricing for the full price list
- Add an
Idempotency-Keyheader for safe retries
Use the JavaScript SDK
Install agent402-client - auto-payment via proof-of-work, no wallet needed.
Installnpm install agent402-client
import { Agent402 } from "agent402-client";
const a = new Agent402(); // free tier (proof-of-work)
const result = await a.call("hash", {
text: "hello world",
algo: "sha256"
});
console.log(result);
- Use
a.find("geocode")to search tools programmatically - Pass a wallet key to unlock paid-only tools
- Enable idempotent retries for production use
Plug into any LLM framework
Drop-in tool definitions for OpenAI, Anthropic, and Vercel AI SDK.
Installnpm install agent402-openai-tools
# also: agent402-anthropic-tools, agent402-ai-sdk
import { agent402Tools } from "agent402-openai-tools";
// also: agent402-anthropic-tools, agent402-ai-sdk
const { tools, execute } = await agent402Tools();
// pass tools to your LLM call
// when it returns a tool_call, run:
await execute(name, args);
- Filter tools by category:
agent402Tools({ categories: ["search"] }) - Combine with the MCP connector for Claude-native integration
- See the playground for live examples
Pay directly with USDC on Base, Solana, Polygon, Arbitrum, Monad, Celo, Avalanche, Sei, Optimism, Stellar & Algorand - plus USDG on Robinhood Chain
Use the x402 protocol for on-chain payment - no API keys, no accounts.
Installnpm install @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
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/article" }),
});
- Check /api/pricing for per-tool USDC prices
- Add an
Idempotency-Keyheader so retries never double-charge - See /.well-known/x402 for the machine-readable payment manifest