Skip to main content

When users interact with AI applications (especially coding assistants or customer support bots), they frequently—and accidentally—paste sensitive information into the chat. A developer might paste a production database connection string containing a password. A customer might paste their credit card number or SSN into a support ticket. Sending this raw data to third-party LLM providers (like OpenAI or Anthropic) creates massive security and compliance risks (GDPR, HIPAA, SOC2). LLM Router’s Zero-Trust Data Redaction solves this. It scans every incoming prompt in milliseconds and automatically masks sensitive data before the request is forwarded to the upstream AI provider.

How Redaction Works

LLM Router uses a combination of high-speed Regex patterns and localized entity recognition to detect sensitive data formats. When a match is found, the sensitive string is replaced with a safe placeholder token (e.g., c****t@g****l.com or 44** **** **** ***9). The AI model processes the safe placeholder, understands the context perfectly, and returns an answer without ever seeing the raw data.

Configuration

You configure exactly which types of data you want to mask inside the gateway.redact object.
node.js

Visualizing the Redaction

What you sent to LLM Router:
“Debug my database connection: postgres://admin:superSecret99!@db.aws.com:5432. Also, my email is john.doe@company.com and my secret project is Project Apollo.”
What LLM Router sent to Anthropic:
“Debug my database connection: postgres://admin:*****@d****om:5432. Also, my email is jo****oe@co****ny.com and my secret project is ****.”
The AI can successfully debug the database structure without ever seeing the actual password, email, or your company’s secret project name.

Configuration Properties

You can toggle individual detectors based on your specific compliance needs. All properties are optional booleans (true to enable redaction, false to disable).

The redact Object

Custom Keyword Redaction

Zero Data Retention Guarantee

Even if you choose not to enable redaction, LLM Router operates on a strict Zero Data Retention architecture. We process your prompts in ephemeral memory to route them, and we never store your prompt data in our databases.