checkPromptInjection refuses a page that tries to give instructions to an AI. redactPII hides personal data in the text. lockdown never reads a page live, so it can answer only from pages Stophy already stored. The first two need an API key.
Make a request
Get an API key in the Quickstart. This request scans a page for prompt injection and hides names, emails and phone numbers in the text.Read the response
The page had no injected instructions, so it comes back as usual. The scan cost $0.0025 on top of the page, andredactPII cost nothing. This real response is cut. The Markdown is shortened.
Prompt injection
checkPromptInjection: true scans the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected, and the message quotes the text as evidence. Nothing is returned and nothing is charged. Send checkPromptInjection as false to read that page anyway.
The scan reads the first 150,000 characters of the page. A longer page, or one the scan cannot finish, comes back with a warning that it was not fully checked, and the scan is not charged.
Redact personal data
redactPII hides personal data in the Markdown and in everything made from it: summary, question, highlights and json. Links, html and rawHtml are not changed. Send true for the defaults, or an object. This request body hides names and emails on a plain text page. The real response is cut.
Read only what is stored
lockdown: true answers only from a stored copy of the page, of any age, and never reads it live. Use it when nothing must reach the site. A page with no stored copy returns 404 notFound.
cacheState hit and costs $0.001.
Options
Limits and errors
- A page the model cannot scan is refused, not returned unredacted. This happens for
PERSONandLOCATIONon a page longer than 300,000 characters. The call returns503 sourceUnavailable, and nothing is charged. Usemode: "fast", or leave those two out ofentities. checkPromptInjection,redactPIIandonlyCleanContentwithout an API key return401 apiKeyRequired.lockdownon a page with no stored copy returns404 notFound.
Price
checkPromptInjection adds $2.50 per 1,000 pages when the scan runs. `redactPII` and `lockdown` add nothing. The page itself is $1 per 1,000 pages. A page that is refused as injected, and a page that cannot be read, cost nothing.
Related
- Freshness and caching covers
minAgeand stored copies. - Content filtering removes banners and prompts with
onlyCleanContent. - Responsible use covers what Stophy reads and what it does not.
- Zero data retention keeps nothing from a call.