Mask personal data before it leaves
Support tickets, transcripts, exports: remove what identifies a person before handing the text to a language model or a vendor. The text is never stored on our side.
- AI-assisted customer support
- nFADP and GDPR compliance
- Archiving
- Test datasets
POST
/v1/pii/redact
1 credit(s) per callDetects and masks emails, phone numbers, IBANs, cards, AHV numbers, IP addresses and URLs. The text is never stored.
Try it online
Result
—
Example request
curl -X POST https://supercalcula.ch/api/v1/pii/redact \
-H "Authorization: Bearer sk_live_…" \
-H "Content-Type: application/json" \
-d '{"text":"Contact : jean@exemple.ch, +41 79 123 45 67, IBAN CH93 0076 2011 6238 5295 7","mode":"placeholder"}'
const res = await fetch("https://supercalcula.ch/api/v1/pii/redact", {
method: "POST",
headers: { Authorization: "Bearer sk_live_…", "Content-Type": "application/json" },
body: JSON.stringify({
"text": "Contact : jean@exemple.ch, +41 79 123 45 67, IBAN CH93 0076 2011 6238 5295 7",
"mode": "placeholder"
}),
});
const data = await res.json();
import requests
r = requests.post("https://supercalcula.ch/api/v1/pii/redact",
headers={"Authorization": "Bearer sk_live_…"},
json={"text":"Contact : jean@exemple.ch, +41 79 123 45 67, IBAN CH93 0076 2011 6238 5295 7","mode":"placeholder"})
print(r.json())
$ch = curl_init("https://supercalcula.ch/api/v1/pii/redact");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer sk_live_…", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["text" => "Contact : jean@exemple.ch, +41 79 123 45 67, IBAN CH93 0076 2011 6238 5295 7", "mode" => "placeholder"]),
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
Response
{
"ok": true,
"data": {
"text": "Contact : [EMAIL_1], [PHONE_1], IBAN [IBAN_1]",
"entities": [
{
"type": "email",
"placeholder": "EMAIL_1",
"start": 10,
"end": 25
},
{
"type": "phone",
"placeholder": "PHONE_1",
"start": 27,
"end": 43
},
{
"type": "iban",
"placeholder": "IBAN_1",
"start": 50,
"end": 76
}
],
"count": 3
}
}Limits and cost
- Cost : 1 credit(s) per call
- Text: 200,000 characters at most
- IBANs checked (modulo 97), cards (Luhn) and AHV numbers (check digit): few false positives
- Swiss, French, German, Austrian, Belgian and international phone numbers