re-doc
Try for free
PII masking for LLM workflowsPage 1 of 3
Guide · PII masking for LLM workflows

PII masking for LLM workflows

If your pipeline sends documents to a language model, personal data goes with them. Re-Doc's REST API replaces names, contact details and IDs with consistent synthetic values first, returns the safe file in its original format, and can return the list of changes so your code can map results back.

Example

What Re-Doc changes

Orange boxes are what Re-Doc finds on its own. Text-based files keep their layout, and each real value is swapped for a realistic synthetic one.

1. Your documentclaim_note.pdf
Upload before the LLM step
POST /api/v1/text-replacement/…
ClaimantOlivia Grant
Policy no.PL-4471-0932
Emailogrant@icloud.com
Phone(312) 555-0117
DamageWater, kitchen ceiling
2. Safe to shareclaim_note_safe.pdf
Upload before the LLM step
POST /api/v1/text-replacement/…
ClaimantMegan Price
Policy no.PL-8826-1457
Emailmprice@mail.com
Phone(312) 555-0386
DamageWater, kitchen ceiling
What to replacePage 2 of 3
Checklist

What to replace, and what to keep

Usually replaced

  • Names, emails, phones and addresses: replaced consistently per document
  • Policy, account and ID numbers: format kept, so parsers still work
  • Your own entity types: pass a plain-language instruction with the request
  • Optional change list: add include_changes=true to get original and replacement pairs

Usually kept

  • Document text and structure for the model
  • Original file format
  • Your existing pipeline: one extra call before the LLM step
Tip

Keep the change list in your own system, not in the prompt. Then the model never sees the real values, and you can map its output back afterwards.

How it works

Three steps

  1. STEP 1

    Upload

    PDF, Word, TXT, scan or photo, up to 50 MB. Sign in with Google; the first 10 pages are free.

  2. STEP 2

    Review

    Re-Doc highlights every change. On scans you can add or remove boxes; for any file you can describe what to keep or remove in plain words.

  3. STEP 3

    Download

    Get the safe copy in the same format you uploaded, with the layout unchanged.

QuestionsPage 3 of 3

Frequently asked questions

01Which plans include the API?
All paid plans, starting with Starter at $11 a month for 500 pages.
02What does the flow look like?
Upload the file, poll for results, download the safe copy. Add include_changes=true to the results call to get the change list. See the API documentation for endpoints.
03Are there rate limits?
Yes: 10 processing requests and 60 general requests per minute per account.
04Can it run inside our network?
Re-Doc has a local installer for Windows machines with a single GPU. Ask the team on the contact page.