Redact personal data
Sharing a transcript, a support log or a document sample almost always means sharing more than intended — the customer's full name sits right next to their card number. This PII redaction API replaces that sensitive text with masked placeholders in place, so the document stays readable while the personal data underneath is gone.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
The problem with manual redaction
Blacking out personal data by hand doesn't scale past a handful of pages, and it's exactly the kind of repetitive, error-prone task where a human misses one instance out of forty. text.redact-pii takes over that job for support transcripts, legal exhibits, research datasets, or any text that has to leave its original system and land somewhere with a different audience — a vendor, a research partner, a public bug report.
How the masking actually works
Submit text to POST /text/redact-pii and the task runs asynchronously, scanning for names, emails, phone numbers, national ID and passport numbers, card and account numbers, and physical addresses, then replacing each occurrence with a labeled placeholder like [NAME] or [EMAIL] rather than deleting it outright. That labeling matters — it preserves the shape and readability of the original text, so a redacted support ticket still reads like a support ticket, just without anything a reader could use to identify the person behind it.
Redaction versus anonymization
Redaction is deliberately blunt: it masks what it finds and leaves everything else untouched, which is the right tool when you need a fast, auditable, reversible-in-spirit record of what was removed. It's a different job from anonymization, which goes further to prevent re-identification through combinations of remaining detail — for text that needs that deeper guarantee, text.anonymize is the better fit; for text that just needs the obvious identifiers stripped out before sharing, redaction is faster and simpler.
Built for pipelines, not one-off edits
Because results are delivered by signed webhook, teams typically wire this into a document pipeline: a ticket gets closed, gets sent for redaction automatically, and the masked version is what gets archived or exported to analytics. For ad hoc use, the signed link works just as well — valid for 24 hours, long enough to redact a batch overnight and pick up the results the next morning without keeping a connection open.
Pricing that matches usage
The cost is $0.003 per request plus $0.0135 per 1000 words processed, which keeps a single ticket or short email cheap while a full archive scales with its actual size. There's no free tier or trial balance — prepaid balance is required, and a request without either returns HTTP 402 rather than a degraded or watermarked result. Failed tasks retry three times automatically and are never charged if they still don't succeed.
What you can do with it
Sharing support tickets with vendors
Mask customer names, emails and card numbers before sending a ticket to a third-party vendor for troubleshooting.
Preparing legal or research exhibits
Redact personal identifiers from documents before they're submitted as evidence or shared with a research partner.
Public bug reports and case studies
Strip identifying details from real customer conversations before publishing them as examples or documentation.
Archiving at scale
Automatically redact closed support tickets before they move into long-term storage or analytics pipelines.
FAQ
How does PII redaction work in this API?
You POST text to /text/redact-pii, and detected personal data like names, emails or card numbers gets replaced with labeled placeholders such as [NAME] or [CARD] in the returned text.
Does redaction delete the text or just hide it?
It replaces the detected personal data with a placeholder rather than deleting the surrounding text, so the document stays readable and its structure is preserved.
What's the difference between redaction and anonymization?
Redaction masks identifiable personal data directly; anonymization goes further to prevent re-identification through remaining context, which is what text.anonymize is built for.
Is PII redaction free to try?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
How much does redacting a document cost?
Pricing is $0.003 per request plus $0.0135 per 1000 words processed, and failed tasks are never charged after their automatic retries.
Can I redact large batches of documents at once?
Yes, the endpoint processes asynchronously, so you can submit large volumes and get results back via webhook without blocking your workflow.
What formats or fields does it recognize?
It recognizes names, emails, phone numbers, national ID and passport numbers, bank and card numbers, and physical addresses within free-form text.
How long do I have to download the redacted result?
The signed result link stays valid for 24 hours; using the webhook instead delivers the result the moment processing finishes.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/text/redact-pii \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"…"}'const res = await fetch("https://api.kit.forhosting.com/text/redact-pii", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "…"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/text/redact-pii",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "…"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/text/redact-pii", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"…"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"…"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/text/redact-pii", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "…"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "text.redact_pii",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_tokens | 20000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
422 | task_failed | The task failed after 3 retries. You are never charged for it. |