x402 Payment API
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
- Request — Client calls
GET https://x402.robtex.com/lookup_dns?hostname=example.com - 402 Response — Server replies with payment requirements (amount, wallet, network)
- Pay & Retry — Client signs USDC payment on Base, attaches
X-Paymentheader, retries - Data Delivered — Server verifies payment, returns data, settles on-chain
Pricing
| Endpoint | Price | Description |
|---|---|---|
lookup_dns | $0.001 | DNS records for a hostname |
ipquery | $0.002 | IP geolocation, ASN, network info |
asquery | $0.001 | Autonomous system details |
pdns/forward | $0.001 | Passive DNS forward lookup |
pdns/reverse | $0.001 | Passive DNS reverse lookup |
pdns/reverse-historic | $0.005 | Historic passive DNS reverse |
ip_reputation | $0.001 | IP blocklist & threat intel check |
domain_reputation | $0.001 | Domain blocklist & ranking check |
| All other endpoints | $0.001 | 50+ 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
- OpenAPI spec:x402.robtex.com/api-docs.json
- Service info:x402.robtex.com (returns JSON with all endpoints and pricing)
- Free alternative:freeapi.robtex.com (rate-limited, no payment needed)
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
- x402.robtex.com — API endpoint
- x402.org — Protocol specification
- Coinbase x402 docs — Client libraries and guides
- Robtex Free API — Rate-limited alternative
- MCP Integration — AI tool protocol