{"openapi": "3.1.0", "info": {"title": "X402 Router", "version": "1.3.0", "description": "Fee router for x402 payments (1% fee to 0x4a1ae0abcd9a6fc7bbcc2a51fa4bb1d6af1b76cc). Routes to LIVE endpoints.", "x-guidance": "Call POST /route/paid (optional JSON body {\"agent\", \"category\", \"chain\", \"max_price\", \"q\"}) with an x402 v2 PAYMENT-SIGNATURE header (legacy v1 X-PAYMENT also accepted) paying 0.01 USDC on Base to the fee receiver 0x4a1ae0abcd9a6fc7bbcc2a51fa4bb1d6af1b76cc (Solana USDC to 7F9nMqE3Bipa7RAgYykxWETRCrixWJLyDHKbZNdv9XEK also accepted). Without payment it returns HTTP 402 with payment requirements. Returns the best-scored LIVE x402 endpoint matching the filters, with price, 1% fee and total.", "contact": {"email": "cameronduff90@gmail.com"}}, "servers": [{"url": "https://router-production-ab89.up.railway.app"}], "paths": {"/route/paid": {"post": {"operationId": "routePaid", "summary": "Route to a LIVE x402 endpoint (paid, 0.01 USDC on Base or Solana)", "x-payment-info": {"price": {"mode": "fixed", "currency": "USD", "amount": "0.010000"}, "protocols": [{"x402": {}}], "network": "eip155:8453", "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "payTo": "0x4a1ae0abcd9a6fc7bbcc2a51fa4bb1d6af1b76cc", "alternatives": [{"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "payTo": "7F9nMqE3Bipa7RAgYykxWETRCrixWJLyDHKbZNdv9XEK"}]}, "x-402": true, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"agent": {"type": "string", "description": "Optional caller/agent identifier"}, "category": {"type": "string", "description": "Optional category filter, e.g. AI, Data, Finance"}, "chain": {"type": "string", "description": "Optional chain filter, e.g. Base, Solana, eip155:8453"}, "max_price": {"type": "number", "description": "Optional max target price in USDC"}, "q": {"type": "string", "description": "Optional keyword search over name/description/url"}}}}}}, "responses": {"200": {"description": "Routed", "content": {"application/json": {"schema": {"type": "object", "properties": {"ok": {"type": "boolean"}, "routed_to": {"type": "string"}, "price": {"type": "number"}, "fee": {"type": "number"}, "total": {"type": "number"}, "fee_receiver": {"type": "string"}, "target_url": {"type": "string"}, "target_method": {"type": "string"}, "score": {"type": "integer"}}, "required": ["ok", "routed_to"]}}}}, "402": {"description": "Payment Required (x402 v2, PAYMENT-REQUIRED header, exact scheme, USDC on Base; Solana also accepted)"}}}, "get": {"operationId": "routePaidGet", "summary": "Route to a LIVE x402 endpoint (paid, 0.01 USDC on Base or Solana)", "x-payment-info": {"price": {"mode": "fixed", "currency": "USD", "amount": "0.010000"}, "protocols": [{"x402": {}}], "network": "eip155:8453", "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "payTo": "0x4a1ae0abcd9a6fc7bbcc2a51fa4bb1d6af1b76cc", "alternatives": [{"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "payTo": "7F9nMqE3Bipa7RAgYykxWETRCrixWJLyDHKbZNdv9XEK"}]}, "x-402": true, "parameters": [{"name": "agent", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Optional caller/agent identifier"}, {"name": "category", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Optional category filter, e.g. AI, Data, Finance"}, {"name": "chain", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Optional chain filter, e.g. Base, Solana, eip155:8453"}, {"name": "max_price", "in": "query", "required": false, "schema": {"type": "number"}, "description": "Optional max target price in USDC"}, {"name": "q", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Optional keyword search over name/description/url"}], "responses": {"200": {"description": "Routed", "content": {"application/json": {"schema": {"type": "object", "properties": {"ok": {"type": "boolean"}, "routed_to": {"type": "string"}, "price": {"type": "number"}, "fee": {"type": "number"}, "total": {"type": "number"}, "fee_receiver": {"type": "string"}, "target_url": {"type": "string"}, "target_method": {"type": "string"}, "score": {"type": "integer"}}, "required": ["ok", "routed_to"]}}}}, "402": {"description": "Payment Required (x402 v2, PAYMENT-REQUIRED header, exact scheme, USDC on Base; Solana also accepted)"}}}}, "/route": {"post": {"operationId": "routeFree", "summary": "Pick the best LIVE x402 endpoint (free; fee is logged, not charged)", "security": [], "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"agent": {"type": "string", "description": "Optional caller/agent identifier"}, "category": {"type": "string", "description": "Optional category filter, e.g. AI, Data, Finance"}, "chain": {"type": "string", "description": "Optional chain filter, e.g. Base, Solana, eip155:8453"}, "max_price": {"type": "number", "description": "Optional max target price in USDC"}, "q": {"type": "string", "description": "Optional keyword search over name/description/url"}}}}}}, "responses": {"200": {"description": "Routed", "content": {"application/json": {"schema": {"type": "object", "properties": {"ok": {"type": "boolean"}, "routed_to": {"type": "string"}, "price": {"type": "number"}, "fee": {"type": "number"}, "total": {"type": "number"}, "fee_receiver": {"type": "string"}, "target_url": {"type": "string"}, "target_method": {"type": "string"}, "score": {"type": "integer"}}, "required": ["ok", "routed_to"]}}}}, "503": {"description": "No matching LIVE endpoint"}}}}, "/health": {"get": {"operationId": "health", "summary": "Health, fee settings and LIVE endpoint count", "security": [], "responses": {"200": {"description": "OK"}}}}, "/stats": {"get": {"operationId": "stats", "summary": "Route count and total fee earned", "security": [], "responses": {"200": {"description": "OK"}}}}, "/metrics": {"get": {"operationId": "metrics", "summary": "Persistent router metrics", "security": [], "responses": {"200": {"description": "OK"}}}}}}