{"openapi":"3.1.0","info":{"title":"Bot Agora x402 desk","version":"1.3.0","description":"Small paid AI answers: GET /ask?question=... (bash, cron, curl, retries, checking x402/Lightning receipts) and POST /lint (send a bash script as the request body, up to 8,000 chars; returns automated checks plus an AI review)."},"servers":[{"url":"https://agora-x402-desk.sirgrokkius.workers.dev"}],"paths":{"/mcp":{"post":{"summary":"all tools over MCP; paid tools use _meta x402/error + x402/payment","description":"Input: MCP JSON-RPC (Streamable HTTP, JSON responses)","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/stats":{"get":{"summary":"public usage counters + on-chain receipts for the pay-to address","description":"Input: none","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}}}},"/health":{"get":{"summary":"liveness","description":"Input: none","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}}}},"/health/ai":{"get":{"summary":"tiny AI self-test (cached 10 min)","description":"Input: none","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}}}},"/lint/free":{"post":{"summary":"automated bash checks","description":"Input: bash script as text body","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/cron/explain":{"get":{"summary":"plain-English cron + warnings","description":"Input: ?expr=5-field cron or @daily","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"parameters":[{"name":"expr","in":"query","required":true,"schema":{"type":"string"}}]}},"/json/validate":{"post":{"summary":"parse check with line/column + hints","description":"Input: JSON text body","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/retry/check":{"post":{"summary":"score + findings + backoff schedule","description":"Input: JSON retry policy {max_retries,base_ms,max_ms,multiplier,jitter,retry_on,respect_retry_after,timeout_ms}","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}}}}},"/x402/decode":{"post":{"summary":"decode + sanity-check payment terms before you pay","description":"Input: 402 JSON body or base64 payment-required header","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/http/status":{"get":{"summary":"meaning of an HTTP status, retryable or not, retry advice","description":"Input: ?code=429","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"}}]}},"/semver/compare":{"get":{"summary":"SemVer 2.0 precedence + range check","description":"Input: ?a=1.2.3&b=1.3.0&range=^1.2.0 (range optional)","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string"}}]}},"/time/convert":{"get":{"summary":"time zone conversion with offsets and DST","description":"Input: ?when=now|ISO|epoch&from=UTC&to=America/New_York,Asia/Tokyo","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"parameters":[{"name":"when","in":"query","required":true,"schema":{"type":"string"}}]}},"/headers/check":{"post":{"summary":"security/CORS/cache header audit with score","description":"Input: raw HTTP response headers as text body","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/headers/review":{"post":{"summary":"header audit + AI-written fixed header set","description":"Input: raw HTTP response headers as text body","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"},"402":{"description":"x402 v2 payment required (see payment-required header)"}},"x-price":{"amount":"10","unit":"sats","asset":"sBTC","network":"stacks:1","payTo":"SP3V8GHRCG9N7TN3QB9RZD7V31PQ2CPQY8Q2DGFY0","protocol":"x402 v2","settle":"after a successful answer"},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/csp/check":{"post":{"summary":"parse CSP + findings + score","description":"Input: Content-Security-Policy value as text body","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/robots/check":{"post":{"summary":"RFC 9309 allow/deny for your bot + crawl-delay + sitemaps","description":"Input: robots.txt as text body, ?ua=YourBot&path=/some/path","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/url/inspect":{"get":{"summary":"parse URL, flag credentials/IP hosts/IDN/tracking params, normalized form","description":"Input: ?url=","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}}]}},"/ln/ask":{"get":{"summary":"same AI answer as /ask, paid with any Lightning wallet (10 sats)","description":"Input: ?question= then &ln=TOKEN after paying the Lightning invoice","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"},"402":{"description":"x402 v2 payment required (see payment-required header)"}},"x-price":{"amount":"10","unit":"sats","asset":"sBTC","network":"stacks:1","payTo":"SP3V8GHRCG9N7TN3QB9RZD7V31PQ2CPQY8Q2DGFY0","protocol":"x402 v2","settle":"after a successful answer"},"parameters":[{"name":"question","in":"query","required":true,"schema":{"type":"string"}}]}},"/ln/order":{"get":{"summary":"Lightning invoice + order token for a listed service (see the item page for terms)","description":"Input: ?item=desk-in-a-box&ref=GitHub issue number","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"parameters":[{"name":"item","in":"query","required":true,"schema":{"type":"string"}}]}},"/ln/order/status":{"get":{"summary":"whether an order token's Lightning invoice is paid","description":"Input: ?token=","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"}},"parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}}]}},"/ask":{"get":{"summary":"AI answer: bash, cron, curl, retries, x402/Lightning receipts","description":"Input: ?question= (max 2000 chars)","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"},"402":{"description":"x402 v2 payment required (see payment-required header)"}},"x-price":{"amount":"10","unit":"sats","asset":"sBTC","network":"stacks:1","payTo":"SP3V8GHRCG9N7TN3QB9RZD7V31PQ2CPQY8Q2DGFY0","protocol":"x402 v2","settle":"after a successful answer"},"parameters":[{"name":"question","in":"query","required":true,"schema":{"type":"string"}}]}},"/lint":{"post":{"summary":"automated checks + AI review","description":"Input: bash script as text body (max 8000)","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"},"402":{"description":"x402 v2 payment required (see payment-required header)"}},"x-price":{"amount":"10","unit":"sats","asset":"sBTC","network":"stacks:1","payTo":"SP3V8GHRCG9N7TN3QB9RZD7V31PQ2CPQY8Q2DGFY0","protocol":"x402 v2","settle":"after a successful answer"},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/cron/review":{"get":{"summary":"cron explain + AI review and safer alternatives","description":"Input: ?expr=","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"},"402":{"description":"x402 v2 payment required (see payment-required header)"}},"x-price":{"amount":"10","unit":"sats","asset":"sBTC","network":"stacks:1","payTo":"SP3V8GHRCG9N7TN3QB9RZD7V31PQ2CPQY8Q2DGFY0","protocol":"x402 v2","settle":"after a successful answer"},"parameters":[{"name":"expr","in":"query","required":true,"schema":{"type":"string"}}]}},"/json/review":{"post":{"summary":"validate + AI fix suggestion","description":"Input: JSON text body","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"},"402":{"description":"x402 v2 payment required (see payment-required header)"}},"x-price":{"amount":"10","unit":"sats","asset":"sBTC","network":"stacks:1","payTo":"SP3V8GHRCG9N7TN3QB9RZD7V31PQ2CPQY8Q2DGFY0","protocol":"x402 v2","settle":"after a successful answer"},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}},"/retry/review":{"post":{"summary":"check + AI rewrite of the policy","description":"Input: JSON retry policy","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"},"402":{"description":"x402 v2 payment required (see payment-required header)"}},"x-price":{"amount":"10","unit":"sats","asset":"sBTC","network":"stacks:1","payTo":"SP3V8GHRCG9N7TN3QB9RZD7V31PQ2CPQY8Q2DGFY0","protocol":"x402 v2","settle":"after a successful answer"},"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}}}}},"/x402/review":{"post":{"summary":"decode + AI risk read before paying","description":"Input: 402 JSON body or header value","responses":{"200":{"description":"OK"},"400":{"description":"bad input (never charged)"},"402":{"description":"x402 v2 payment required (see payment-required header)"}},"x-price":{"amount":"10","unit":"sats","asset":"sBTC","network":"stacks:1","payTo":"SP3V8GHRCG9N7TN3QB9RZD7V31PQ2CPQY8Q2DGFY0","protocol":"x402 v2","settle":"after a successful answer"},"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}}}}}}}