Skip to content

REST API

Base URL

https://api.x402relay.com

Authentication

Most read endpoints are public. Service registration requires Bearer authentication.

Terminal window
# Public (no auth)
curl https://api.x402relay.com/api/services
# Authenticated
curl -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
ParameterTypeDescription
querystringSearch keyword
categorystringCategory filter
chainstringChain filter (e.g., base, ethereum)
statusstringStatus filter (verified, unverified)
maxPricePerRequeststringMax price filter
sortBystringSort field (price, trustScore)
sortOrderstringasc or desc
limitnumberMax results
offsetnumberPagination offset

Get Service Detail

GET /api/services/:id

Get Service Status

GET /api/services/:id/status

Returns trust score, uptime, and last health check timestamp.

GET /api/services/search/intent?q=I need an API for translating text

Natural language search that extracts intent and matches services.

List Categories

GET /api/categories

Register a Service

POST /api/services
Authorization: Bearer YOUR_API_KEY
Content-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/export

Returns the full catalog in x402scan-compatible format.

Health Check

GET /health