{"openapi":"3.1.0","info":{"title":"HTML Toolkit","version":"0.1.0","description":"HTML string safety — entity encode/decode, strip tags to plain text and sanitize untrusted HTML to a safe allowlist.","x-guidance":"HTML string safety — entity encode/decode, strip tags to plain text and sanitize untrusted HTML to a safe allowlist. Each operation is an HTTP POST to its /v1/<operation> path with a JSON request body (see each operation's requestBody schema) and returns a JSON response. Endpoints are paid per successful call via x402 or MPP (USDC on Base); an unpaid request returns 402 with payment metadata in the WWW-Authenticate header.","contact":{"email":"hello@openverbs.com"}},"x-discovery":{"ownershipProofs":["0xb1401a71756f51464a9962db12f1eb3e9522490cd20010b06d00cf7b7770acfd5f79721f9dfdf2643f8cecd29af3bde9ec133941a386042b32d9886053a70de61b","0xc1c1f11793e18a00fcb7072421f26e89fb75b6aa517fa84370564991f4b10efa024f6f57e4e67eefd20cf46cc01fc5a62d793fa8fbcda04f26c946a3433d73f91b","0x676b474af0ef9ed4809b5d12d2e789b36e52d56215b21f601d71f76620e36ec630347116a7b2b349a3c3681e5db0fbfa76c4169a676b6d6f27864d0e5017284a1c","0xc2ab96522515ed9e9bc4f1a241b774bd48df42e951ddbf7f6aa8fc76f5a96a20421703e1ec402ce7eb1e4eabea3b6e4e4129cf39d56ea91cf4fcf38561fc94fc1c"]},"servers":[{"url":"https://html.openverbs.com"}],"paths":{"/health":{"get":{"summary":"Health check","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"version":{"type":"string"}}}}}}}}},"/v1/encode":{"post":{"summary":"HTML entity encode","description":"Encode text to HTML entities so it can be safely embedded in markup. By default uses hex numeric references; set useNamedReferences for named entities (&amp;, &copy;) or encodeEverything to encode every character. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["html entity encode","encode html entities","escape html text","text to html entities","html escape api","encode unsafe characters"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":200000,"description":"Plain text to encode."},"useNamedReferences":{"type":"boolean","description":"Use named entities where available. Default false."},"encodeEverything":{"type":"boolean","description":"Encode every character, not just unsafe ones. Default false."}},"required":["text"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ encoded }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ encoded }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Encode text to HTML entities so it can be safely embedded in markup. By default uses hex numeric references; set useNamedReferences for named entities (&amp;, &copy;) or encodeEverything to encode every character.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Encode text to HTML entities so it can be safely embedded in markup. By default uses hex numeric references; set useNamedReferences for named entities (&amp;, &copy;) or encodeEverything to encode every character.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Encode text to HTML entities so it can be safely embedded in markup. By default uses hex numeric references; set useNamedReferences for named entities (&amp;, &copy;) or encodeEverything to encode every character.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/decode":{"post":{"summary":"HTML entity decode","description":"Decode HTML entities (named, decimal and hex numeric references) back into plain text. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["html entity decode","decode html entities","unescape html text","html entities to text","numeric entity decoder","named entity lookup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","maxLength":200000,"description":"Text containing HTML entities."}},"required":["html"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ decoded }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ decoded }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Decode HTML entities (named, decimal and hex numeric references) back into plain text.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Decode HTML entities (named, decimal and hex numeric references) back into plain text.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Decode HTML entities (named, decimal and hex numeric references) back into plain text.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/strip":{"post":{"summary":"Strip HTML to text","description":"Remove all HTML tags, returning the plain text content. Entities are decoded to real characters by default (set decodeEntities=false to keep them encoded). Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["strip html tags","html to plain text","remove html markup","extract text from html","decode html text content","sanitize to text"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","maxLength":200000,"description":"HTML markup to strip."},"decodeEntities":{"type":"boolean","description":"Decode entities to characters. Default true."}},"required":["html"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ text }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ text }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Remove all HTML tags, returning the plain text content. Entities are decoded to real characters by default (set decodeEntities=false to keep them encoded).","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Remove all HTML tags, returning the plain text content. Entities are decoded to real characters by default (set decodeEntities=false to keep them encoded).","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Remove all HTML tags, returning the plain text content. Entities are decoded to real characters by default (set decodeEntities=false to keep them encoded).","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/sanitize":{"post":{"summary":"Sanitize HTML","description":"Sanitize untrusted HTML to a safe allowlist. Keeps common formatting and links but removes dangerous scripting tags, inline event handlers and unsafe URL schemes. Ideal for rendering user-supplied HTML. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["sanitize html","clean untrusted html","xss html sanitizer","remove script tags","safe html allowlist","sanitize user html"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","maxLength":200000,"description":"Untrusted HTML to sanitize."}},"required":["html"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ sanitized }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ sanitized }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Sanitize untrusted HTML to a safe allowlist. Keeps common formatting and links but removes dangerous scripting tags, inline event handlers and unsafe URL schemes. Ideal for rendering user-supplied HTML.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Sanitize untrusted HTML to a safe allowlist. Keeps common formatting and links but removes dangerous scripting tags, inline event handlers and unsafe URL schemes. Ideal for rendering user-supplied HTML.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Sanitize untrusted HTML to a safe allowlist. Keeps common formatting and links but removes dangerous scripting tags, inline event handlers and unsafe URL schemes. Ideal for rendering user-supplied HTML.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}}},"x-service-info":{"categories":["content"],"docs":{"homepage":"https://html.openverbs.com","apiReference":"https://html.openverbs.com/openapi.json"}}}