What is PasteGuard?
PasteGuard is an OpenAI-compatible proxy that protects personal data and secrets before sending to your LLM provider (OpenAI, Azure, etc.).The Problem
When using LLM APIs, every prompt is sent to external servers - including customer names, emails, and sensitive business data. Many organizations have policies against sending PII to third-party AI services.The Solution
PasteGuard sits between your app and the LLM API:| Mode | How it works |
|---|---|
| Mask | Replace PII with placeholders, send to provider, restore in response |
| Route | PII requests stay on your local LLM (Ollama, vLLM, llama.cpp), others go to your configured provider |
Quick Example
1
You send a prompt
2
PasteGuard masks PII
Detected:
Dr. Sarah Chen → <PERSON_1>, sarah.chen@hospital.org → <EMAIL_ADDRESS_1>3
OpenAI receives
4
You get the response (unmasked)
The LLM never sees the real data. PII is masked before sending and restored in the response.
Features
- PII Detection — Names, emails, phone numbers, credit cards, IBANs, and more
- Secrets Detection — API keys, tokens, private keys caught before they reach the LLM
- Streaming Support — Real-time unmasking as tokens arrive
- 24 Languages — Works in English, German, French, and 21 more
- OpenAI-Compatible — Change one URL, keep your code
- Self-Hosted — Your servers, your data stays yours
- Open Source — Apache 2.0 license, full transparency
- Dashboard — See every protected request in real-time