LLM redaction tool
The LLM redaction tool that gives you the full answer back.
Spendplane is an LLM redaction tool for teams. It masks personal data, secrets and company keywords in prompts and tool results before they reach OpenAI, Anthropic or any other model, and restores the real values in the reply. Change one base URL; your code stays the same.
Your app's prompt
Spendplane
4 items masked
What the model receives
The model never saw the customer's details. Your app got a complete answer.
Example with fictional data.
Try it with your own text
Mask the fictional example or paste your own text to see what Spendplane detects and replaces.
Your text is masked on Spendplane's own servers and is never stored or logged. Nothing is sent to an AI model.
How reversible PII redaction works
- 1
Detect
Every outgoing prompt, message and tool result is scanned for personal data, secrets and your own keywords.
- 2
Replace
Each value becomes a placeholder like [EMAIL_1]. The same value gets the same placeholder, so the model can still reason about it.
- 3
Restore
When the reply, a streamed token or a tool call contains a placeholder, Spendplane puts the real value back before it reaches you.
What it redacts
- Email addresses and phone numbers in international formats
- IBANs (checksum-validated), card numbers and US social security numbers
- API keys, bearer tokens and private keys
- Company names with legal forms such as GmbH, AB, S.L. or Inc.
- Your own keywords: product codenames, client names, project terms
- People's names in tool results, through name recognition hosted in Frankfurt (MCP firewall)
Tested at CRM scale
We ran 60,000 fictional CRM leads from 10 countries, with 401,930 personal details, through Spendplane's MCP firewall in pages of 200 records, the way an AI agent reads a CRM.
- 0
- of 401,930 names, emails, phone numbers, companies, addresses and IBANs reached the model, including those inside free-text notes
- 100%
- of placeholders restored to the right value in the agent's next query
- 100%
- of business data (status, city, title, dates, amounts) still readable
- ~3,800
- records masked per second
Redact PII before the OpenAI or Anthropic API
Use the SDK you already have. Point it at Spendplane and use your Spendplane key; your provider key stays in the Spendplane vault.
OpenAI SDK (Python)
from openai import OpenAI
client = OpenAI(
base_url="https://api.spendplane.com/v1",
api_key="YOUR_SPENDPLANE_KEY",
)
reply = client.chat.completions.create(
model="gpt-4.1-mini",
messages=[{"role": "user", "content": prompt}],
)
# Personal data in prompt is masked on the way out
# and restored in reply.choices[0].message.contentAnthropic SDK (TypeScript)
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://api.spendplane.com",
apiKey: process.env.SPENDPLANE_KEY,
});
const reply = await client.messages.create({
model: "claude-sonnet-4-5",
max_tokens: 1024,
messages: [{ role: "user", content: prompt }],
});
// Tools, tool results and streaming work as usualUsing Cursor, Claude Code, n8n or an MCP server? See every integration.
Spendplane compared with other ways to redact
| Your own regex script | One-way masking | Spendplane | |
|---|---|---|---|
| Masks emails, phones, IBANs, cards and secrets | Partly | ||
| Real values restored in the model's reply | |||
| Restores values inside tool calls and streamed replies | |||
| Same placeholder for the same value across a request | Manual | Sometimes | |
| Phone and bank formats from many countries | Manual | Partly | |
| Covers IDEs, coding agents, MCP tools and the browser | |||
| Log of what was caught, without storing the values | Partly | ||
| Spend caps and provider failover in the same hop |
One-way masking: tools that remove or hash values without putting them back into the answer.
One redaction layer for the whole company
Questions about LLM redaction
What is an LLM redaction tool?
An LLM redaction tool removes personal data and secrets from text before it is sent to a large language model. Spendplane replaces each sensitive value with a placeholder such as [EMAIL_1], sends the cleaned prompt to the model, and puts the real values back into the reply, so your app and your users still get a complete answer.
Is the redaction reversible?
Yes. Spendplane keeps a short-lived map of placeholders for each request. When the model writes [EMAIL_1] in its answer, in a streamed reply or in a tool call, Spendplane swaps the real value back in before it reaches your app or your tools.
Which models and SDKs does it work with?
Any client that lets you set an OpenAI-compatible base URL (the OpenAI SDKs, LangChain, LlamaIndex, Vercel AI SDK, Cursor, Continue, Cline, Codex CLI, n8n, Dify) and the Anthropic SDKs and Claude Code through Anthropic's native format. Requests go to OpenAI, Anthropic or OpenRouter models with your own provider key.
Does Spendplane store my prompts?
No. Prompt and reply text is not stored. The dashboard records what was caught (for example "email, 2 items") and usage, without the original values.
How is it different from a regex script?
A regex script can find some patterns, but it cannot put the values back into the answer, keep placeholders consistent across a conversation, or restore them in tool calls. In our 60,000-record test, local phone formats written inside free-text notes were the hardest part. Spendplane now masks every one of them, with zero leaks across 401,930 personal details, and keeps maintaining these formats so your team doesn't have to.
Does it help with GDPR and HIPAA?
Keeping personal data out of third-party AI providers supports GDPR data minimisation and reduces what you have to cover in processor agreements. Spendplane is one part of your compliance work, not a certification. A BAA for healthcare customers is upcoming.
New to this? Read how to redact PII before sending it to an LLM.