{"openapi":"3.1.0","info":{"title":"Agent Tools (x402)","version":"1.0.0","description":"Pay-per-call utilities for AI agents. Payments in USDC on Base via x402 v2; no accounts or API keys. Handler errors do not trigger settlement. Settlement errors can have an uncertain payment outcome; check the client payment result and on-chain status before retrying. No endpoint performs server-side fetching of caller-supplied URLs.","x-guidance":"Three paid endpoints. GET /api/random returns verifiable random integers derived from the public drand beacon (deterministic and publicly reproducible - not for secrets or gambling). POST /api/markdown converts caller-supplied HTML to clean markdown (body: {html, url?}; the service never fetches). POST /api/agent-scan scores agent-readiness of caller-supplied html/robotsTxt/llmsTxt/headers (heuristic checklist, not a ranking benchmark). Pay per call in USDC on Base via x402 v2: read the 402 PAYMENT-REQUIRED header or JSON body, sign the exact-amount EIP-3009 authorization, and retry with PAYMENT-SIGNATURE. Handler errors do not trigger settlement. If settlement fails or times out, check the client payment result and on-chain status before retrying; an error alone does not prove no payment occurred. Free routes: GET /, GET /docs, GET /health, GET /openapi.json.","contact":{"name":"Clear Rank Studio (automated assistant)","email":"t6y11a@mail.instinct.com","url":"https://agent-ready-check.t6y11a.workers.dev"}},"servers":[{"url":"https://agent-tools-x402.t6y11a.workers.dev"}],"paths":{"/":{"get":{"operationId":"catalog","summary":"Machine-readable service catalog (free)","security":[],"responses":{"200":{"description":"Catalog JSON"}}}},"/docs":{"get":{"operationId":"docs","summary":"Human-readable documentation (free)","security":[],"responses":{"200":{"description":"HTML documentation"}}}},"/health":{"get":{"operationId":"health","summary":"Liveness probe (free)","security":[],"responses":{"200":{"description":"ok"}}}},"/openapi.json":{"get":{"operationId":"openapi","summary":"This OpenAPI document (free)","security":[],"responses":{"200":{"description":"OpenAPI 3.1 JSON"}}}},"/api/random":{"get":{"operationId":"random_integers","summary":"Verifiable random integers from the public drand League of Entropy beacon. Deterministic and publicly reproducible; not for secrets, key generation or gambling.","tags":["random","rng","drand","verifiable-randomness","sampling"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetSymbol":"USDC","payTo":"0x686db26e961cd23eaad7beed1c489347cd836046","amountAtomic":"2000","maxTimeoutSeconds":60,"facilitator":"https://facilitator.payai.network","paymentRequiredHeader":"PAYMENT-REQUIRED","note":"The 402 JSON body mirrors the full payment-required object for crawlers that do not read headers."}}]},"parameters":[{"name":"n","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":1},"description":"how many integers"},{"name":"min","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"default":0},"description":"inclusive lower bound; max - min must not exceed 1000000000000"},{"name":"max","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"default":100},"description":"inclusive upper bound; max - min must not exceed 1000000000000"}],"responses":{"200":{"description":"Paid result. Settlement is attempted after handler success. A settlement error can leave the payment outcome uncertain.","content":{"application/json":{"schema":{"type":"object","properties":{"integers":{"type":"array","items":{"type":"integer"}},"beacon":{"type":"object","properties":{"round":{"type":"integer"},"randomness":{"type":"string"},"signature":{"type":"string"},"chainHash":{"type":"string"}}},"derivation":{"type":"object"},"verify":{"type":"object"}},"required":["integers","beacon"]}}}},"402":{"description":"Payment Required"},"422":{"description":"Invalid parameters. Not charged."},"503":{"description":"Randomness source unavailable. Not charged."}}}},"/api/markdown":{"post":{"operationId":"html_to_markdown","summary":"Caller-supplied HTML to clean markdown (title, byline, excerpt, site name). Never fetches; inert parsing only.","tags":["html","markdown","extraction","reader","parsing"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetSymbol":"USDC","payTo":"0x686db26e961cd23eaad7beed1c489347cd836046","amountAtomic":"5000","maxTimeoutSeconds":60,"facilitator":"https://facilitator.payai.network","paymentRequiredHeader":"PAYMENT-REQUIRED","note":"The 402 JSON body mirrors the full payment-required object for crawlers that do not read headers."}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","minLength":1,"description":"raw HTML of the page (max 1,000,000 chars)"},"url":{"type":"string","description":"optional source URL used as link base"}},"required":["html"]}}}},"responses":{"200":{"description":"Paid result. Settlement is attempted after handler success. A settlement error can leave the payment outcome uncertain.","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":["string","null"]},"byline":{"type":["string","null"]},"excerpt":{"type":["string","null"]},"siteName":{"type":["string","null"]},"markdown":{"type":"string"},"markdownChars":{"type":"integer"}},"required":["markdown","markdownChars"]}}}},"402":{"description":"Payment Required"},"413":{"description":"HTML over 1M char limit. Not charged."},"422":{"description":"No readable article content or bad input. Not charged."}}}},"/api/agent-scan":{"post":{"operationId":"agent_readiness_scan","summary":"Heuristic agent-readiness assessment of caller-supplied materials (html, robotsTxt, llmsTxt, headers). Not a ranking/readiness benchmark; inputs are unverified self-reports. Never fetches.","tags":["agent-readiness","audit","seo","llms-txt","structured-data"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetSymbol":"USDC","payTo":"0x686db26e961cd23eaad7beed1c489347cd836046","amountAtomic":"10000","maxTimeoutSeconds":60,"facilitator":"https://facilitator.payai.network","paymentRequiredHeader":"PAYMENT-REQUIRED","note":"The 402 JSON body mirrors the full payment-required object for crawlers that do not read headers."}}]},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","description":"raw HTML of the page to assess"},"robotsTxt":{"type":"string","description":"contents of the site's robots.txt"},"llmsTxt":{"type":"string","description":"contents of the site's llms.txt, if any"},"headers":{"type":"object","description":"response headers of the page"}}}}}},"responses":{"200":{"description":"Paid result. Settlement is attempted after handler success. A settlement error can leave the payment outcome uncertain.","content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"integer"},"grade":{"type":"string"},"summary":{"type":"string"},"checks":{"type":"array","items":{"type":"object"}},"note":{"type":"string"}},"required":["score","grade","checks"]}}}},"402":{"description":"Payment Required"},"422":{"description":"Body must be JSON. Not charged."}}}}}}