API Reference
Endpoints
Health Check
Check if the service is running.
Endpoint: GET /health
Response:
{
"status": "ok",
"timestamp": "2025-01-20T12:00:00.000Z",
"uptime": 3600
}Example:
curl http://localhost:8080/healthRoot
Get service information.
Endpoint: GET /
Response:
Protected Endpoints
All endpoints defined in protectedEndpoints require x402 payment verification.
Flow:
Client makes request to protected endpoint
x402-expressmiddleware verifies paymentIf payment verified, request is proxied to
forwardToURLResponse from proxied API is returned to client
Example:
Response Codes
200
Success - Payment verified and request proxied
402
Payment Required - Payment not verified
502
Bad Gateway - Proxy request failed
500
Internal Server Error - Application error
Headers
Request Headers
The following headers are forwarded to the proxied API:
content-typeauthorizationx-requested-withacceptuser-agent
Response Headers
The following headers are forwarded from the proxied API:
content-typecontent-encodingcache-controletaglast-modified
Error Responses
Payment Required (402)
Proxy Error (502)
Last updated