{"openapi":"3.1.0","info":{"title":"X Pay","version":"1.0.0","description":"Pay-per-request utility APIs powered by x402 using USDC on Base.","x-logo":"https://www.api-xpay.com/logo.png","x-service-name":"X Pay","x-guidance":"Utility: GET /x402/ping, /x402/status, /x402/time, /x402/uuid; POST /x402/echo, /x402/hash. Payment: GET /x402/payment. AI: POST /x402/summarize with { text }.","x-tags":["x402","payments","usdc","base","utility"]},"servers":[{"url":"https://www.api-xpay.com","description":"X Pay"}],"tags":[{"name":"Utility","description":"General-purpose paid utility endpoints"},{"name":"Payment","description":"Payment receipt and transaction endpoints"},{"name":"AI","description":"AI-powered endpoints"}],"paths":{"/x402/ping":{"get":{"operationId":"ping","tags":["Utility"],"x-tags":["health","ping","monitoring","utility"],"summary":"Ping","description":"Health check ping","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"},"security":[{"X402Payment":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"pong"},"network":{"type":"string","example":"base"},"asset":{"type":"string","example":"USDC"},"service":{"type":"string","example":"X Pay"}}}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded PaymentRequired JSON object","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"PAYMENT-SIGNATURE header is required"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}},"example":{"x402Version":2,"error":"PAYMENT-SIGNATURE header is required","resource":{"url":"https://www.api-xpay.com/x402/example","description":"Health check ping","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"1000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8","maxTimeoutSeconds":60,"resource":"https://www.api-xpay.com/x402/example","extra":{"name":"USD Coin","version":"2"}}],"extensions":{}}}}}}}},"/x402/status":{"get":{"operationId":"status","tags":["Utility"],"x-tags":["status","health","service","utility"],"summary":"Status","description":"Service status and payment configuration","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"},"security":[{"X402Payment":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"service":{"type":"string","example":"X Pay"},"status":{"type":"string","example":"operational"},"payments":{"type":"object","properties":{"network":{"type":"string","example":"base"},"asset":{"type":"string","example":"USDC"},"protocol":{"type":"string","example":"x402"}}}}}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded PaymentRequired JSON object","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"PAYMENT-SIGNATURE header is required"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}},"example":{"x402Version":2,"error":"PAYMENT-SIGNATURE header is required","resource":{"url":"https://www.api-xpay.com/x402/example","description":"Service status and payment configuration","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"1000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8","maxTimeoutSeconds":60,"resource":"https://www.api-xpay.com/x402/example","extra":{"name":"USD Coin","version":"2"}}],"extensions":{}}}}}}}},"/x402/time":{"get":{"operationId":"time","tags":["Utility"],"x-tags":["time","datetime","utc","clock"],"summary":"Server Time","description":"Current server time in UTC","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"},"security":[{"X402Payment":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"utc":{"type":"string","example":"2026-09-11T12:00:00.000Z"},"unix":{"type":"integer","example":1757592000},"network":{"type":"string","example":"base"},"asset":{"type":"string","example":"USDC"}}}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded PaymentRequired JSON object","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"PAYMENT-SIGNATURE header is required"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}},"example":{"x402Version":2,"error":"PAYMENT-SIGNATURE header is required","resource":{"url":"https://www.api-xpay.com/x402/example","description":"Current server time in UTC","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"1000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8","maxTimeoutSeconds":60,"resource":"https://www.api-xpay.com/x402/example","extra":{"name":"USD Coin","version":"2"}}],"extensions":{}}}}}}}},"/x402/uuid":{"get":{"operationId":"uuid","tags":["Utility"],"x-tags":["uuid","id","generator","random"],"summary":"UUID Generator","description":"Generate a random UUID v4","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"},"security":[{"X402Payment":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"uuid":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"network":{"type":"string","example":"base"},"asset":{"type":"string","example":"USDC"}}}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded PaymentRequired JSON object","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"PAYMENT-SIGNATURE header is required"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}},"example":{"x402Version":2,"error":"PAYMENT-SIGNATURE header is required","resource":{"url":"https://www.api-xpay.com/x402/example","description":"Generate a random UUID v4","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"1000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8","maxTimeoutSeconds":60,"resource":"https://www.api-xpay.com/x402/example","extra":{"name":"USD Coin","version":"2"}}],"extensions":{}}}}}}}},"/x402/echo":{"post":{"operationId":"echo","tags":["Utility"],"x-tags":["echo","json","debug","utility"],"summary":"Echo","description":"Echo a JSON message back","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"},"security":[{"X402Payment":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","example":"hello"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"echo":{"type":"string","example":"hello"},"network":{"type":"string","example":"base"},"asset":{"type":"string","example":"USDC"}}}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded PaymentRequired JSON object","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"PAYMENT-SIGNATURE header is required"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}},"example":{"x402Version":2,"error":"PAYMENT-SIGNATURE header is required","resource":{"url":"https://www.api-xpay.com/x402/example","description":"Echo a JSON message back","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"1000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8","maxTimeoutSeconds":60,"resource":"https://www.api-xpay.com/x402/example","extra":{"name":"USD Coin","version":"2"}}],"extensions":{}}}}}}}},"/x402/hash":{"post":{"operationId":"hash","tags":["Utility"],"x-tags":["hash","sha256","crypto","digest"],"summary":"SHA-256 Hash","description":"Compute a SHA-256 hash of text","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"},"security":[{"X402Payment":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","example":"hello"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"algorithm":{"type":"string","example":"sha256"},"hash":{"type":"string"},"network":{"type":"string","example":"base"},"asset":{"type":"string","example":"USDC"}}}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded PaymentRequired JSON object","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"PAYMENT-SIGNATURE header is required"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}},"example":{"x402Version":2,"error":"PAYMENT-SIGNATURE header is required","resource":{"url":"https://www.api-xpay.com/x402/example","description":"Compute a SHA-256 hash of text","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"1000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8","maxTimeoutSeconds":60,"resource":"https://www.api-xpay.com/x402/example","extra":{"name":"USD Coin","version":"2"}}],"extensions":{}}}}}}}},"/x402/payment":{"get":{"operationId":"payment","tags":["Payment"],"x-tags":["payment","receipt","x402","usdc","transaction"],"summary":"Payment Receipt","description":"Payment receipt with transaction details","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"},"security":[{"X402Payment":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"service":{"type":"string","example":"X Pay"},"payment":{"type":"object","properties":{"requestId":{"type":"string","example":"req_abc123"},"amount":{"type":"string","example":"0.001"},"asset":{"type":"string","example":"USDC"},"network":{"type":"string","example":"base"},"payer":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0"},"receiver":{"type":"string","example":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8"},"transactionHash":{"type":"string","example":"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"}}}}}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded PaymentRequired JSON object","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"PAYMENT-SIGNATURE header is required"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}},"example":{"x402Version":2,"error":"PAYMENT-SIGNATURE header is required","resource":{"url":"https://www.api-xpay.com/x402/example","description":"Payment receipt with transaction details","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"1000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8","maxTimeoutSeconds":60,"resource":"https://www.api-xpay.com/x402/example","extra":{"name":"USD Coin","version":"2"}}],"extensions":{}}}}}}}},"/x402/summarize":{"post":{"operationId":"summarize","tags":["AI"],"x-tags":["ai","summary","text","nlp"],"summary":"Summarize Text","description":"AI text summarization","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"10000"},"security":[{"X402Payment":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","example":"Text that should be summarized."}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"summary":{"type":"string"},"network":{"type":"string","example":"base"},"asset":{"type":"string","example":"USDC"}}}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded PaymentRequired JSON object","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"PAYMENT-SIGNATURE header is required"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}},"example":{"x402Version":2,"error":"PAYMENT-SIGNATURE header is required","resource":{"url":"https://www.api-xpay.com/x402/example","description":"AI text summarization","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8","maxTimeoutSeconds":60,"resource":"https://www.api-xpay.com/x402/example","extra":{"name":"USD Coin","version":"2"}}],"extensions":{}}}}}}}}},"components":{"securitySchemes":{"X402Payment":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"Base64-encoded x402 payment payload"}},"schemas":{"PaymentRequired":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}},"x-network":"eip155:8453","x-asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","x-resources":[{"method":"GET","path":"/x402/ping","tag":"Utility","tags":["health","ping","monitoring","utility"],"url":"https://www.api-xpay.com/x402/ping","price":"0.001 USDC","amount":"1000","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"}},{"method":"GET","path":"/x402/status","tag":"Utility","tags":["status","health","service","utility"],"url":"https://www.api-xpay.com/x402/status","price":"0.001 USDC","amount":"1000","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"}},{"method":"GET","path":"/x402/time","tag":"Utility","tags":["time","datetime","utc","clock"],"url":"https://www.api-xpay.com/x402/time","price":"0.001 USDC","amount":"1000","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"}},{"method":"GET","path":"/x402/uuid","tag":"Utility","tags":["uuid","id","generator","random"],"url":"https://www.api-xpay.com/x402/uuid","price":"0.001 USDC","amount":"1000","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"}},{"method":"POST","path":"/x402/echo","tag":"Utility","tags":["echo","json","debug","utility"],"url":"https://www.api-xpay.com/x402/echo","price":"0.001 USDC","amount":"1000","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"}},{"method":"POST","path":"/x402/hash","tag":"Utility","tags":["hash","sha256","crypto","digest"],"url":"https://www.api-xpay.com/x402/hash","price":"0.001 USDC","amount":"1000","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"}},{"method":"GET","path":"/x402/payment","tag":"Payment","tags":["payment","receipt","x402","usdc","transaction"],"url":"https://www.api-xpay.com/x402/payment","price":"0.001 USDC","amount":"1000","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000"}},{"method":"POST","path":"/x402/summarize","tag":"AI","tags":["ai","summary","text","nlp"],"url":"https://www.api-xpay.com/x402/summarize","price":"0.01 USDC","amount":"10000","x-payment-info":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"10000"}}]}