REST API
Base URL
https://api.x402relay.comAuthentication
Most read endpoints are public. Service registration requires Bearer authentication.
# Public (no auth)curl https://api.x402relay.com/api/services
# Authenticatedcurl -H "Authorization: Bearer YOUR_API_KEY" \ https://api.x402relay.com/api/services \ -X POST -d '...'Endpoints
Search Services
GET /api/services?query=AI&category=cat-ai&limit=10| Parameter | Type | Description |
|---|---|---|
query | string | Search keyword |
category | string | Category filter |
chain | string | Chain filter (e.g., base, ethereum) |
status | string | Status filter (verified, unverified) |
maxPricePerRequest | string | Max price filter |
sortBy | string | Sort field (price, trustScore) |
sortOrder | string | asc or desc |
limit | number | Max results |
offset | number | Pagination offset |
Get Service Detail
GET /api/services/:idGet Service Status
GET /api/services/:id/statusReturns trust score, uptime, and last health check timestamp.
Intent Search
GET /api/services/search/intent?q=I need an API for translating textNatural language search that extracts intent and matches services.
List Categories
GET /api/categoriesRegister a Service
POST /api/servicesAuthorization: Bearer YOUR_API_KEYContent-Type: application/json
{ "name": "My API", "description": "Description of the API", "endpoint": "https://api.example.com", "category": "cat-ai", "pricing": { "currency": "USD", "pricePerRequest": "0.001", "freeQuota": 100 }, "x402Config": { "paymentAddress": "0x...", "network": "base" }}Export Catalog
GET /api/exportReturns the full catalog in x402scan-compatible format.
Health Check
GET /health