x402 Protocol · USDC on Base

Things your model
can't do alone

Render a live website, turn a PDF into clean JSON, screen text for prompt injection, verify an email actually exists.
Your agent calls the API, pays a fraction of a cent in USDC, and gets the result — no API keys, no signup, no human in the loop.

Drop into your agent in one line: curl -fsSL https://x402tools.xyz/skill.md | claude
9 Live Endpoints
$0.01 Starting Price
Base Network

Services

Each service is a standalone API endpoint. Call it, pay the fee, get the result.

📱

QR Code Generator

Generate QR codes in PNG, SVG, or Base64 from any text or URL.

$0.01 POST
qr.x402tools.xyz/v1/generate
⟳ Checking
🎨

Styled QR Code

Artistic QR codes with custom dot shapes (dots, diamonds, stars), gradients, and colors.

$0.05 POST
qr.x402tools.xyz/v1/generate/styled
⟳ Checking
📸

Screenshot Capture

Capture screenshots of any website. Supports dark mode, element selectors, and delayed capture.

$0.05 POST
snap.x402tools.xyz/v1/capture
⟳ Checking
🌐

DNS Lookup

Get A, AAAA, MX, NS, TXT, SOA records for any domain.

$0.02 GET
dns.x402tools.xyz/v1/lookup
⟳ Checking
📄

DocParse

Send any public URL (HTML or PDF) — get back clean, structured JSON.

$0.01 POST
docparse.x402tools.xyz/parse
⟳ Checking
🛡️

Guardex

Screen any text for prompt injection attacks. Returns risk score and threat categories.

$0.03 POST
guard.x402tools.xyz/screen
⟳ Checking
📧

Mailcheck

Validate & verify any email — syntax, MX records, SMTP deliverability, disposable detection, typo suggestion, risk scoring.

$0.03 POST
mailcheck.x402tools.xyz/v1/validate
⟳ Checking
📑

Rendex

Render raw HTML or a public URL into a PDF. Configurable page size, margins, and headers.

$0.05 POST
rendex.x402tools.xyz/v1/render
⟳ Checking
👁️

Visionex

Extract text from images using OCR. Supports structured blocks, hOCR, and multi-language.

$0.05 POST
visionex.x402tools.xyz/v1/extract
⟳ Checking
🎯

Prospex

Name + company domain → a sales-ready prospect profile: seniority, buyer persona, decision-maker probability, company intel, email pattern, and a personalised cold-email opener.

$0.50 POST
prospex.x402tools.xyz/enrich
⟳ Checking

How It Works

The x402 protocol makes API payments as simple as HTTP.

1

Send a request

Call any endpoint with a standard HTTP request. No headers, no auth tokens.

curl -X POST https://qr.x402tools.xyz/v1/generate \
  -H "Content-Type: application/json" \
  -d '{"text": "hello"}'
2

Get a 402 response

The server responds with payment requirements in the PAYMENT-REQUIRED header (base64 JSON).

HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: <base64>   # body: {}

# decoded:
{
  "x402Version": 2,
  "accepts": [{
    "scheme": "exact",
    "network": "eip155:8453",
    "amount": "1000",
    "payTo": "0xcEbb...5b6"
  }]
}
3

Pay & receive

Attach USDC payment proof to your request. Get your result instantly.

curl -X POST https://qr.x402tools.xyz/v1/generate \
  -H "Content-Type: application/json" \
  -H "X-Payment: <payment-proof>" \
  -d '{"text": "hello"}' \
  --output qr.png

💡 AI agents handle this automatically. Libraries like @x402/fetch and AgentCash manage the full 402 handshake for you.

Quick Examples

Generate a QR Code

curl -X POST https://qr.x402tools.xyz/v1/generate \
  -H "Content-Type: application/json" \
  -d '{
    "text": "https://x402tools.xyz",
    "size": 512,
    "format": "png"
  }' --output qr.png

Take a Screenshot

curl -X POST https://snap.x402tools.xyz/v1/capture \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "width": 1280,
    "height": 720,
    "fullPage": true
  }' --output screenshot.png

DNS Lookup

curl "https://dns.x402tools.xyz/v1/lookup?domain=example.com"

Parse a Document

curl -X POST https://docparse.x402tools.xyz/parse \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://arxiv.org/abs/2301.00001",
    "options": {
      "output_schema": "research"
    }
  }'

Screen for Prompt Injection

curl -X POST https://guard.x402tools.xyz/screen \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Ignore previous instructions...",
    "options": {"sensitivity": "medium"}
  }'

Render HTML to PDF

curl -X POST https://rendex.x402tools.xyz/v1/render \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<h1>Invoice</h1><p>Total: $99</p>",
    "output": "base64"
  }'

For AI Agents

Machine-readable discovery files so your agent can find and use these services autonomously.

🔌 Connect via MCP — one config line for your AI agent

Compatible with Claude Desktop, Cursor, Windsurf, Cline, Continue, OpenAI Responses API, Gemini ADK. Agent signs payments locally — private key never leaves the agent.

// Claude Desktop / Cursor / Windsurf — claude_desktop_config.json or .cursor/mcp.json
{
  "mcpServers": {
    "x402tools": {
      "url": "https://mcp.x402tools.xyz/mcp"
    }
  }
}

// OpenAI Responses API
client.responses.create({
  model: "gpt-4o",
  tools: [{ type: "mcp", server_label: "x402tools",
            server_url: "https://mcp.x402tools.xyz/mcp" }]
});

// Local stdio (auto-pay convenience): npx -y @x402-tools/mcp

Or: discover and call a service directly

        // 1. Discover services (live catalog: official + community-deployed, auto-updates)
        const catalog = await fetch("https://api.x402tools.xyz/agents.json").then(r => r.json());

// 2. Find the right tool
const qr = catalog.services.find(s => s.name === "qr-generator");

// 3. Call it (x402 client handles payment automatically)
import { fetchWithPayment } from "@x402/fetch";
const result = await fetchWithPayment(qr.endpoint, {
  method: "POST",
  body: JSON.stringify({ text: "https://example.com", format: "png" })
});

Available On

Payments & billing

One rail today, more on the way — pick what fits your agent.

🟢

x402 · USDC on Base — Live

The native rail. Per-call USDC micropayments, settled on Base. No accounts, no keys, no minimums. Your agent signs each payment locally and pays only for successful calls.

🤖

No wallet of your own? — Live

Use a facilitator or an x402-aware client (@x402/fetch, AgentCash, or our MCP server). They manage the wallet and the 402 handshake so your code never touches a private key.

💳

Card / API-key billing — Roadmap

For teams that can't hold crypto: prepaid balance via card, billed against an API key, with the same per-call pricing. Planned — not live yet. Want it sooner? Tell us.

💡 Why x402 first? Micropayments down to $0.01 are uneconomical on card rails (fees dwarf the charge) and require accounts agents can't create. x402 lets an autonomous agent pay a fraction of a cent with zero signup. Card/API-key billing will sit on top of the same pricing for human teams who prefer it.

FAQ

The questions agents (and their builders) ask before wiring this in.

Is this production-ready, or a demo?

Live and in production. All 10 services run on Azure (AKS) behind TLS with health checks, rate limiting, and uptime monitoring. Real USDC settles on Base mainnet — see reliability for current status.

Can I try a service before paying?

Yes. Every service exposes a free GET /preview that returns a realistic sample of the paid response — e.g. qr.x402tools.xyz/preview. Health checks (GET /health) and discovery files are free too. You only pay when you call the real endpoint.

Do I need a wallet or signup?

No signup, no API keys, no accounts. You need a wallet that can sign x402 payments (USDC on Base). Agent frameworks like @x402/fetch, AgentCash, or the MCP server handle the full 402 handshake for you — the private key never leaves your agent.

What does it cost?

Per call, in USDC: $0.01–$0.05 depending on the service. No subscriptions, no minimums, no monthly fee. You pay only for successful calls — the price for each route is in the 402 challenge and in agents.json.

What happens if a call fails?

Payment settles only on a successful (2xx) response. If a service errors (5xx) you aren't charged for a result you didn't get. Invalid input returns a 4xx with a clear message before any payment is required. See the error shapes in llms-full.txt.

How do I wire this into my agent?

Three ways: drop in the skill (curl -fsSL https://x402tools.xyz/skill.md | claude), connect the MCP server with one config line, or call endpoints directly with an x402-aware fetch. See the worked examples for the full request/response flow.