Register Your API
Why Register?
Section titled “Why Register?”Registering your API in x402 Relay makes it discoverable by AI agents worldwide. Benefits:
- Visibility — AI agents find your API via search, MCP, and intent matching
- Trust Score — Verified APIs rank higher and get more traffic
- Analytics — Track discovery and usage metrics (coming soon)
Automatic Discovery
Section titled “Automatic Discovery”x402 Relay automatically discovers APIs through:
- x402scan — Crawls Base chain for x402 transactions
- GitHub Scanner — Searches GitHub for x402 implementations
- Manifest Scanner — Reads
ai.txtandx402.jsonfiles from your domain
Add ai.txt to Your Domain
Section titled “Add ai.txt to Your Domain”Create https://yourdomain.com/.well-known/ai.txt:
x402-endpoint: https://api.yourdomain.comx402-network: basex402-asset: USDCx402-price: 0.001Manual Registration
Section titled “Manual Registration”Via API
Section titled “Via API”curl -X POST https://api.x402relay.com/api/services \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Your API Name", "description": "What your API does", "endpoint": "https://api.yourdomain.com/v1", "category": "cat-ai", "pricing": { "currency": "USD", "pricePerRequest": "0.001", "freeQuota": 100 }, "x402Config": { "paymentAddress": "0xYourWalletAddress", "network": "base" } }'Required Fields
Section titled “Required Fields”| Field | Description |
|---|---|
name | API name (max 255 chars) |
description | What the API does (max 2000 chars) |
endpoint | Base URL of your API |
category | Category ID (see /api/categories) |
pricing.currency | Price currency (e.g., USD) |
pricing.pricePerRequest | Cost per API call |
x402Config.paymentAddress | Your wallet address for receiving payments |
x402Config.network | Blockchain network (e.g., base, ethereum) |
Verification Process
Section titled “Verification Process”After registration, your API goes through verification:
- Registered →
unverifiedstatus - Probed → x402 Relay sends a test request to verify 402 response
- Verified → Trust Score calculated, status becomes
verified
Verification typically completes within the next scan cycle (1 hour).