PII Redaction

Redact personal details from supplied text. Returns redacted text, detected data types and counts; the submitted input is retained for 90 days.

Pay by wallet (x402) AI-generated pii-redact

Example

Example answer
{
  "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

FieldTypeRequiredWhat it is
textstringYesText to redact PII from

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
entitiesarrayAlways (present in every successful answer)
entity_countsobjectAlways (present in every successful answer)
redacted_textstringAlways (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 john.smith@example.com, SSN 123-45-6789"
    },
    "max_price_cents": 3
  }'

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