REST API reference
Call any registered API as a standard HTTP POST. x402 USDC settlement on the first call.
Base URL
Base URL
https://blueagent.dev/apiEndpoints
/api/mcpMCP JSON-RPC 2.0 — initialize, tools/list, tools/call
/api/mcpDiscovery JSON (or SSE stream if Accept: text/event-stream)
/api/x402/[id]Call any registered API by id. First call returns 402, retry with X-Payment header
/api/usagePublic lifetime call counts per API (cached 60s)
/api/register-apiSubmit a new API to the marketplace (coming soon)
/api/catalogPublic catalog JSON for AI scrapers (coming soon)
Calling a tool — direct REST
Skip MCP if you want plain HTTP. Each registered API is reachable at /api/x402/[id]:
curl
curl -X POST https://blueagent.dev/api/x402/honeypot-check \
-H 'Content-Type: application/json' \
-d '{ "token": "0x..." }'
# → 402 Payment Required + payment instructions
# Sign EIP-3009, retry with X-Payment header
# See: /docs/x402Calling a tool — via MCP
JSON-RPC
POST /api/mcp
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "honeypot_check",
"arguments": { "token": "0x..." }
}
}MCP names use underscores (honeypot_check), REST paths use hyphens (honeypot-check).
Status codes
200— success, JSON response body400— invalid request body402— payment required, seeacceptsarray404— tool id not registered429— rate limit (100 req/min/IP)503— upstream tool service unavailable
CORS
All endpoints set Access-Control-Allow-Origin: *. Browser-side calls work without proxying.
Examples by language
See per-API code samples — open any API on the marketplace and pick the language tab.