exepal_
exepal / tools / prompt-injection-scanner

Check what an agent is about to read for hidden instructions.

Prompt injection hides in the content agents fetch: a display:none div on a product page, white text in a résumé, Unicode tag characters in a tool result, a comment that says 'AI assistants: ignore your instructions'. The scanner finds the hidden text, decodes the tricks and matches 20 injection patterns, then gives a verdict, a score and the evidence. Optionally it returns the visible text with the hidden parts removed.

What you get back

  • verdict: clean, suspicious or likely_injection, with a 0–100 score and a one-line summary
  • findings[]: rule, severity, message, evidence snippet and location (visible, css-hidden, white-text, html-comment, meta-tag, unicode-tags…)
  • hidden: how many hidden segments and characters, by kind
  • clean: the visible text with hidden elements and invisible characters stripped, ready to hand to the model (optional)
  • Fetches the page for you (url) or scans html / text you already have

Call it over HTTP

No account and no API key. The first response is 402 Payment Required with the price; an x402-capable client pays in USDC on Base and retries. You're only charged when the call succeeds.

curl -i -X POST https://api.exepal.com/v1/scan/injection \
  -H "content-type: application/json" \
  -d '{"url":"https://example.com/product","clean":true}'
# → 402 Payment Required (price, network: base, pay-to address)
# An x402 client pays in USDC and retries → 200 with the JSON answer

Use it from Claude, Cursor or any MCP client

Add https://api.exepal.com/mcp as a remote MCP server. The tool is scan_injection, at the same price.

{
  "mcpServers": {
    "exepal": { "type": "http", "url": "https://api.exepal.com/mcp" }
  }
}

Questions

Is this an ML classifier?
No. It is a deterministic rule engine: hidden-content extraction, Unicode decoding, base64 decoding and pattern matching. It explains every finding and never costs more than $0.002. Classifier APIs charge $0.001–0.01 per request on monthly plans and don't look at HTML at all.
What does it catch that a classifier misses?
Where the text sits. Instructions a human can't see (display:none, font-size 0, white on white, off-screen, aria-hidden, comments, meta tags, Unicode tag characters) score higher than the same words in plain sight, because there is no honest reason to hide them.
Will an article about prompt injection be flagged?
It may come back suspicious, since it quotes attack phrases, but long visible documents with only medium findings are scored down and hidden content is what pushes a page to likely_injection.
Am I charged if the page fails to load?
No. A page that can't be fetched returns a 502 and no payment settles.

Related tools