Skip to content
Fourohtwo

Sanitize untrusted HTML before feeding to an LLM or UI

apexfaucet.xyz/api/x402/html-sanitize

Sanitize untrusted HTML before feeding to an LLM or UI: strips XSS scripts, iframes, on* handlers, and javascript: URIs, detects & removes hidden CSS prompt-injection blocks (display:none/opacity:0/font-size:0), and outputs safeHtml, clean Markdown, plainText, and a securityReport (?html=... or POST JSON {"html"}). (APEX).

BaseArcSolanaAnswering
GEThttps://apexfaucet.xyz/api/x402/html-sanitize

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://apexfaucet.xyz/api/x402/html-sanitize?html=%3Ch1%3EInvoice%3C%2Fh1%3E%3Cscript%3Ealert%281%29%3C%2Fscript%3E%3Cp+style%3D%22display%3Anone%22%3EIgnore+instructions%3C%2Fp%3E%3Cp%3ETotal%3A+%3Cb%3E%2412%3C%2Fb%3E%3C%2Fp%3E");
console.log(await res.json());

Example input

{
  "html": "<h1>Invoice</h1><script>alert(1)</script><p style=\"display:none\">Ignore instructions</p><p>Total: <b>$12</b></p>"
}