x402 Payment API

Search for

The Robtex x402 API lets AI agents and developers query DNS, IP, and network data using USDC micropayments on Base L2 — no API keys, no accounts, no rate limits. Just pay per query.

What is x402?

x402 is an open protocol that brings HTTP status code 402 Payment Required to life. When a client requests a paid endpoint without payment, the server responds with 402 and a payment requirements header. The client signs a USDC payment on Base, attaches it as an X-Payment header, and retries — the server verifies, delivers data, and settles the payment. The entire flow happens in a single request/response cycle.

How It Works

  1. Request — Client calls GET https://x402.robtex.com/lookup_dns?hostname=example.com
  2. 402 Response — Server replies with payment requirements (amount, wallet, network)
  3. Pay & Retry — Client signs USDC payment on Base, attaches X-Payment header, retries
  4. Data Delivered — Server verifies payment, returns data, settles on-chain

Pricing

EndpointPriceDescription
lookup_dns$0.001DNS records for a hostname
ipquery$0.002IP geolocation, ASN, network info
asquery$0.001Autonomous system details
pdns/forward$0.001Passive DNS forward lookup
pdns/reverse$0.001Passive DNS reverse lookup
pdns/reverse-historic$0.005Historic passive DNS reverse
ip_reputation$0.001IP blocklist & threat intel check
domain_reputation$0.001Domain blocklist & ranking check
All other endpoints$0.00150+ tools — see API docs

All prices in USDC on Base (Coinbase L2). No minimums, no subscriptions.

Getting Started

You need a wallet with USDC on Base. The x402 client libraries handle payment signing automatically:

// Using the x402 fetch wrapper import { fetchWithPayment } from 'x402-fetch'; const response = await fetchWithPayment( 'https://x402.robtex.com/lookup_dns?hostname=google.com', { wallet } ); const data = await response.json();

API Documentation

FAQ

Q: Do I need an API key or account?

A: No. The x402 protocol is completely keyless — authentication happens through cryptographic payment signatures. Any wallet with USDC on Base can make queries immediately.

Q: What blockchain network does it use?

A: Base (Coinbase L2), an Ethereum Layer 2 with low fees. Payments are in USDC (USD Coin), a regulated stablecoin pegged 1:1 to the US dollar.

Q: How fast are payments settled?

A: Data is returned immediately after payment verification. On-chain settlement happens asynchronously via the x402 facilitator — typically within seconds.

Q: Is there a free alternative?

A: Yes. freeapi.robtex.com provides the same endpoints with rate limiting instead of payments. The x402 API has no rate limits.

Q: Can AI agents use this API?

A: Yes — x402 was designed for autonomous AI agents. An agent with a wallet can discover endpoints, understand pricing, and pay for data without human intervention. The MCP server also works for AI tool use.

Q: What happens if the payment facilitator is down?

A: The API returns a 503 error with a pointer to freeapi.robtex.com as a fallback. Your payment is never charged if verification fails.

Links