PII Redaction
Redact personal details from supplied text. Returns redacted text, detected data types and counts; the submitted input is retained for 90 days.
pii-redact Example
{
"entities": [
{
"end": 12,
"type": "PERSON_NAME",
"start": 8,
"redacted_as": "[REDACTED_PERSON_NAME]"
},
{
"end": 42,
"type": "EMAIL",
"start": 20,
"redacted_as": "[REDACTED_EMAIL]"
},
{
"end": 59,
"type": "SSN",
"start": 48,
"redacted_as": "[REDACTED_SSN]"
}
],
"entity_counts": {
"SSN": 1,
"IBAN": 0,
"EMAIL": 1,
"PHONE": 0,
"ADDRESS": 0,
"PASSPORT": 0,
"ID_NUMBER": 0,
"CREDIT_CARD": 0,
"PERSON_NAME": 1
},
"redacted_text": "Contact [REDACTED_PERSON_NAME] at [REDACTED_EMAIL], SSN [REDACTED_SSN]"
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
text | string | Yes | Text to redact PII from |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
entities | array | Always (present in every successful answer) |
entity_counts | object | Always (present in every successful answer) |
redacted_text | string | Always (present in every successful answer) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "pii-redact",
"inputs": {
"text": "Contact John at [email protected], SSN 123-45-6789"
},
"max_price_cents": 3
}' {
"tool": "strale_execute",
"arguments": {
"slug": "pii-redact",
"inputs": {
"text": "Contact John at [email protected], SSN 123-45-6789"
},
"max_price_cents": 3
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "pii-redact",
inputs: {
"text": "Contact John at [email protected], SSN 123-45-6789"
},
max_price_cents: 3,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="pii-redact",
inputs={
"text": "Contact John at [email protected], SSN 123-45-6789",
},
max_price_cents=3,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/pii-redact?text=Contact+John+at+john.smith%40example.com%2C+SSN+123-45-6789' Limitations
Personal details without context can be missed
Context-dependent PII (e.g., names without surrounding context) may occasionally be missed
What to do instead: Run a second pass with an explicit entity list of known names from your dataset to catch context-free occurrences
Accuracy is lower outside English and Nordic languages
Optimised for English and Nordic languages — other languages may have lower detection accuracy
What to do instead: For non-supported languages, pre-tag known PII patterns (e.g., national ID formats) with regex before calling pii-redact
Submitted text is retained for 90 days
Submitted text, including any sensitive identifiers it contains, is stored unredacted in the transaction record for 90 days before clearing. Processing sends the text to no third party, and the returned output is redacted; the stored input remains unchanged during retention.
What to do instead: Submit the smallest span that needs redacting rather than a whole document, or run redaction in your own environment where the input is never transmitted.
Bundled checks that include it
- Web Extract & Clean €0.30
Related tools
- Address Parser €0.05
- Company Industry Classification €0.05
- Company Name Match €0.02
- Credit Score Band €0.02
- CSV Cleaner €0.02
- CSV to JSON €0.02