The Privacy Layer for your AI Stack.
Sanitize prompts in real-time with our open-source SDK. Run PII detection locally via WebAssembly or deploy the Sidecar to your VPC for centralized governance.
npm i rehydra
import { createAnonymizer } from 'rehydra'; const anonymizer = createAnonymizer({ ner: { mode: 'quantized' }, semantic: { enabled: true } }); await anonymizer.initialize(); const result = await anonymizer.anonymize( 'Hello John Smith from Acme Corp in Berlin!' );
Hello <PII type="PERSON" gender="male" id="1" /> from <PII type="ORG" id="2" /> in <PII type="LOCATION" scope="city" country="Germany" id="3" />
Guides
Getting Started.
Here are some of our Getting Started guides to fast track your compliant AI usage.

Product Launch
Introducing Rehydra: The Privacy Layer for the AI Stack
Nov 4, 2025

Product Launch
Introducing Rehydra: The Privacy Layer for the AI Stack
Nov 4, 2025

Product Launch
Introducing Rehydra: The Privacy Layer for the AI Stack
Nov 4, 2025

Engineering
Semantic Redaction vs. Regex: Why Context Matters for Privacy in AI
Dec 31, 2025

Engineering
Semantic Redaction vs. Regex: Why Context Matters for Privacy in AI
Dec 31, 2025

Engineering
Semantic Redaction vs. Regex: Why Context Matters for Privacy in AI
Dec 31, 2025
FAQ
Frequently Asked Questions
Does the SDK require an internet connection?
Can I detect custom identifiers specific to my domain (e.g., Order Numbers)?
You can define custom regex-based recognizers using createCustomIdRecognizer. You provide a pattern, a name, and a PII type (usually CASE_ID or CUSTOMER_ID). Example:
Is the PII mapping data secure?
What is the difference between the "standard" and "quantized" NER models?
How does rehydra improve Machine Translation (MT) context for anonymized entities?
Does the SDK require an internet connection?
Can I detect custom identifiers specific to my domain (e.g., Order Numbers)?
You can define custom regex-based recognizers using createCustomIdRecognizer. You provide a pattern, a name, and a PII type (usually CASE_ID or CUSTOMER_ID). Example:
Is the PII mapping data secure?
What is the difference between the "standard" and "quantized" NER models?
How does rehydra improve Machine Translation (MT) context for anonymized entities?
Does the SDK require an internet connection?
Can I detect custom identifiers specific to my domain (e.g., Order Numbers)?
You can define custom regex-based recognizers using createCustomIdRecognizer. You provide a pattern, a name, and a PII type (usually CASE_ID or CUSTOMER_ID). Example:
Is the PII mapping data secure?
What is the difference between the "standard" and "quantized" NER models?
How does rehydra improve Machine Translation (MT) context for anonymized entities?



