Debuly

Rehydra

Open-source SDK that finds personal data in LLM prompts, swaps it for reversible pseudonyms and restores the real values after the model replies.

Open source

What is Rehydra?

Rehydra is an open-source toolkit for removing personal data from prompts before they reach a language model, then putting the real values back once the answer returns. Plain redaction deletes names, emails and keys for good, which leaves the model unable to reason about them. Rehydra instead replaces each sensitive value with a pseudonym, stores an encrypted mapping and rehydrates the output afterward. Structured items such as emails, phone numbers, UK postcodes, IBANs and credit cards are matched with patterns, while an on-device NER model picks up names, organizations and locations. The hosted playground runs the pattern step in the browser and offers an optional download of a model of roughly 265MB for the NER step. The package is available on npm, as a CLI and as an OpenCode plugin. The code is MIT-licensed, so there is no price to pay, and it suits developers who handle customer or regulated data.

Use cases

  • Strip personal data from prompts before sending
  • Pseudonymize names and emails for LLMs
  • Restore real values in model output
  • Protect data used with coding agents
  • Try PII scrubbing in a browser playground
  • Support GDPR-minded AI workflows

Who it's for

  • Application developers
  • Security engineers
  • Privacy and compliance teams
  • Teams using coding agents

Why use Rehydra

  • Pseudonyms let the model keep the context of a prompt, so sanitized requests still make sense.
  • Pattern matching in the browser and an on-device NER model mean personal data does not need a cloud scanning service.
  • Rehydration puts the real values back into the response, so useful results are not lost.
  • The npm package, CLI and OpenCode plugin cover app code as well as coding-agent workflows.

Rehydra features

  • Pattern-based detection of emails, phones, UK postcodes, IBANs and credit cards
  • Optional NER model for names, organizations and locations
  • Reversible replacement with pseudonyms
  • Encrypted mapping used to rehydrate original values
  • Three-step flow in the playground: input, scrubbed, restored
  • Pattern step runs client-side in the browser
  • npm package, CLI and OpenCode plugin

How to get started with Rehydra

  1. Open the hosted playground and paste text that contains sensitive data.
  2. Leave the NER option on if you also want names, organizations and locations detected.
  3. Press Scrub Data to see the pseudonymized text, then review how each value was replaced.
  4. Install the npm package, CLI or OpenCode plugin to do the same inside your own application.
  5. Send the scrubbed prompt to your model and restore the originals in the reply.

Rehydra limitations

  • Detection is automatic and may miss unusual personal data, so review sensitive workflows
  • The NER model is about 265MB and takes a few seconds to load the first time
  • A developer SDK rather than a finished consumer app

Rehydra pricing

Rehydra is open source, so you can use and self-host it for free.

Prices can change and may vary by country or exclude tax. Check the official pricing page.

Rehydra alternatives

The main Rehydra alternatives listed on Debuly are Guardrails AI, LMQL, Semantic Kernel, AI/ML API, Alibaba Cloud Model Studio and Blackbox AI. The table compares pricing and platforms; order is A–Z.

Rehydra compared with its alternatives
ToolPricingStarting pricePlatforms
RehydraOpen source—Web
AI/ML APIPaid—API, Web
Alibaba Cloud Model StudioPaid$6/moWeb, API
Blackbox AIContact sales$0.05, usage-basedAPI, CLI, Web
Guardrails AIOpen source—Self-hosted, API, CLI
LMQLOpen source—Python, CLI, Web, Self-hosted
Semantic KernelOpen source—Python, .NET, Java, Windows
  1. AI/ML API

    One API key for more than a thousand AI models across chat, image, video and audio, billed pay-as-you-go with prepaid credits.

  2. Alibaba Cloud Model Studio

    Alibaba Cloud platform giving developers API access to Qwen and partner models for text, image, video and speech, billed per token or by subscription.

  3. Blackbox AI

    Inference platform with one OpenAI-compatible endpoint for 300+ open and closed models, encrypted connections, and dedicated enterprise deployments.

  4. Guardrails AI

    Open-source framework that wraps LLM apps with validators for PII, hallucination and policy checks, plus Snowglobe simulation testing.

  5. LMQL

    Programming language from ETH Zurich for LLM prompting that adds Python control flow, typed variables and hard output constraints.

  6. Semantic Kernel

    Microsoft's open-source SDK for building AI agents and multi-agent systems in Python, .NET and Java, now succeeded by Microsoft Agent Framework.

Rehydra FAQ

Is Rehydra free and open source?

Yes. The code is MIT-licensed and you can try the hosted playground online without a plan. No paid tiers are listed.

What kinds of personal data does Rehydra detect?

Patterns catch emails, phone numbers, UK postcodes, IBANs and credit cards. An optional NER model detects names, organizations and locations.

Does Rehydra send my data to the cloud?

The playground shows the pattern step as client-side, and the NER step uses a downloadable model of about 265MB that runs on your device.

How do I use Rehydra in my own project?

Install the npm package, or use the CLI or the OpenCode plugin, then scrub prompts before sending them and rehydrate the responses.

What are alternatives to Rehydra?

Microsoft Presidio, Private AI, Protecto and LLM Guard offer related PII detection and redaction. On Debuly, compare Guardrails AI, LMQL and Semantic Kernel.

Sources & verification

Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.

SourceTypeAccessed
playground.rehydra.aiofficial
github.com/rehydra-ai/rehydra-sdkrepository
playground.rehydra.ai/official

Image credits

  • Logo: none collected yet, so a monogram is shown.
  • Cover: none collected yet, so a generated tile is shown.

Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.