x402Relay is the Payment & Discovery Hub for AI Agents
x402Relay connects payment, discovery, and execution into one machine-native flow — so AI agents can find trusted APIs, settle instantly via HTTP 402, and operate autonomously at internet scale.
# AI agent discovers APIs from the Marketplace
GET /api/search?tags=translation¤cy=USDC
→ 3 verified services found
# Agent picks the best one and calls it
POST https://translate.example.com/api/v1
# 402 Payment Required → Agent pays with USDC
HTTP/1.1 200 OK
Payment: settled | 0.001 USDC | tx: 0x3f...a1For API Providers
Monetize your APIs for AI agents. x402 Gateway lets you add pay-per-call pricing with one line of config, and list on the Agent Marketplace instantly.
Explore FeaturesFor Agent Builders
Give your AI agents payment superpowers. Integrate x402 payments with one SDK call so agents can autonomously discover, negotiate, and pay for APIs.
See How It WorksThe Problem
APIs Weren’t Built for AI Agents
Today’s API economy relies on human-centric authentication and billing. As AI agents become autonomous, this model breaks down.
API Keys Everywhere
Every API requires a unique key, separate registration, and manual management. AI agents can’t autonomously acquire new API access.
Billing Account Overhead
Credit cards, invoices, payment methods — each provider has its own billing system. Impossible for autonomous agents to navigate.
Manual Setup Required
Sign up, verify email, add payment method, generate keys, configure SDKs. A process designed for humans, not machines.
No Discovery
AI agents have no way to find new APIs on their own. Every service URL must be hardcoded by a human. The agentic economy can’t scale without autonomous discovery.
Protocol
How x402 Works
A simple, four-step HTTP flow that turns any API into a pay-per-use service — no API keys needed.
Agent Calls API
AI agent sends a standard HTTP request to a paid API endpoint.
GET /api/translatePayment Required
Server responds with HTTP 402 and payment requirements (amount, token, address).
402 Payment RequiredSign & Pay
Agent signs a USDC payment authorization and resends the request with payment proof.
Payment-Signature: 0x...Get Response
Facilitator verifies & settles the payment on-chain. Agent receives the API response.
200 OK + dataAgent Calls API
AI agent sends a standard HTTP request to a paid API endpoint.
GET /api/translatePayment Required
Server responds with HTTP 402 and payment requirements (amount, token, address).
402 Payment RequiredSign & Pay
Agent signs a USDC payment authorization and resends the request with payment proof.
Payment-Signature: 0x...Get Response
Facilitator verifies & settles the payment on-chain. Agent receives the API response.
200 OK + dataIntegration
Agentic Wallets by Coinbase
Powered by Coinbase Developer Platform (CDP), agentic wallets give AI agents their own crypto wallets with programmable spending controls.
AI Agent
Autonomous Task
Agentic Wallet
Coinbase CDP
x402 Payment
Sign & Send
API Access
Get Response
AI Agent
Autonomous Task
Agentic Wallet
Coinbase CDP
x402 Payment
Sign & Send
API Access
Get Response
Autonomous API Discovery
Agent discovers new APIs, evaluates pricing from 402 responses, and pays on-demand — no pre-registration needed.
Budget-Controlled Spending
Set spending limits per agent, per task, or per time period. Wallet enforces constraints on-chain.
Multi-Agent Collaboration
Multiple agents share a single wallet or operate independent wallets. Each transaction is auditable on-chain.
Why x402Relay
Start Free with Coinbase. Get Chosen by AI Agents with x402Relay.
Coinbase provides the payment rails. x402Relay builds the marketplace where AI agents actually find and choose your API.
| Feature | Coinbase CDP | x402Relay |
|---|---|---|
| Agent Marketplace | — | ✓ |
| JPYC (JPY Stablecoin) | — | ✓ |
| Gateway (Zero Code Change) | — | ✓ |
| Dashboard & Analytics | — | ✓ |
| AI-Native Design (llms.txt) | — | ✓ |
| Basic Payment (verify/settle) | ✓ | ✓ |
| USDC on Base | ✓ | ✓ |
| Free Tier | ✓ | ✓ |
Being discoverable by AI agents is the new competitive advantage. Join the waitlist to list your API on the Agent Marketplace.
Components
Everything You Need to Monetize APIs
x402Relay provides a complete stack — from the Agent Marketplace where AI agents discover your services, to the x402 Crawler that verifies every API.
Payment Gateway
Reverse proxy that intercepts 402 responses, handles payment flows, and manages on-chain settlements transparently.
Facilitator
Verify and settle x402 payments on-chain. Supports EIP-3009 (USDC native) and Permit2 (ERC-20 universal).
Agent Marketplace
The verified API catalog for AI agents. x402 Crawler tests and validates every service, so agents can discover, compare, and connect with confidence.
TypeScript SDK
Client and server SDKs for TypeScript. Add x402 payments to your API in 3 lines of code, or consume paid APIs seamlessly.
Dashboard
Real-time revenue analytics, transaction monitoring, and usage insights. See exactly how AI agents interact with your APIs.
Use Cases
Built for the Agentic Economy
From micro-payments to premium data feeds — x402 enables new business models for the AI era.
AI Translation API
Charge $0.001 per translation request. AI agents pay per-call with USDC or JPYC — no subscription needed.
POST /translate → 402 → Pay $0.001 USDC or 0.15 JPYC → Get translationPremium Data Feeds
Sell real-time market data, weather feeds, or analytics. Micro-payments make premium data accessible to any agent.
GET /market/BTC → 402 → Pay $0.01 USDC → Get live priceMCP Server Billing
Monetize Model Context Protocol servers. Charge per tool call so LLMs pay for external capabilities on demand.
MCP tool call → 402 → Pay $0.005 USDC → Execute toolDeveloper Experience
3 Lines to Monetize Any API
Drop-in middleware for servers. Transparent payment handling for clients. Works with any HTTP framework.
# gateway.yaml — Monetize your API in 3 lines
upstream: "http://localhost:3000"
routes:
- path: "/api/translate"
price:
amount: "1000" # $0.001 USDC
network: "eip155:8453" # Base L2
asset: "USDC"
# Start the gateway
# $ x402-gateway start --config gateway.yaml// client.ts — Pay for APIs automatically
import { x402Client } from "@x402relay/sdk"
const client = x402Client({
walletProvider: agentWallet, // Coinbase Agentic Wallet
})
// Works just like fetch() — handles 402 automatically
const response = await client.fetch(
"https://api.example.com/translate",
{
method: "POST",
body: JSON.stringify({ text: "Hello" }),
}
)
const data = await response.json()
// Payment handled transparently!Roadmap
Building the Future of Machine Payments
From testnet prototype to production-ready infrastructure for the agentic economy.
Foundation
- Facilitator server (verify & settle)
- EIP-3009 (USDC) on Base Sepolia
- Basic Gateway reverse proxy
- TypeScript SDK (x402Client)
Production
- Base Mainnet deployment
- Agent Marketplace — verified API catalog
- x402 Crawler — automated API testing & validation
- Dashboard & analytics
- Rate limiting & abuse prevention
Scale
- JPYC (JPY stablecoin) support
- Multi-chain support (Ethereum, Solana)
- Subscription & streaming payments
- Advanced agent wallet integrations
- Decentralized facilitator network
FAQ
Frequently Asked Questions
Get Early Access
Ready to Build the Agentic Economy?
Join the waitlist to get early access to x402Relay. Be the first to monetize your APIs for AI agents.