Text

Redact sensitive personal information (PII) from text

Deterministically mask sensitive personally identifiable information (PII) in customer conversations and transcripts. ### Redaction Rules - **Language Preservation**: Output stays in the exact same language as input (`language`). - **Structure Preservation**: Preserves speaker turns, punctuation, whitespace, business context, sentiment, and next actions. - **Standardized Placeholders**: - Personal: `[PERSON_NAME]`, `[DATE_OF_BIRTH]`, `[ADDRESS]` - Contact: `[PHONE_NUMBER]`, `[EMAIL]` - Financial & IDs: `[BVN]`, `[ACCOUNT_NUMBER]`, `[CARD_NUMBER]`, `[TRANSACTION_ID]`, `[GOVERNMENT_ID]`, `[CUSTOMER_ID]`, `[EMPLOYEE_ID]`, `[STUDENT_ID]`, `[POLICY_NUMBER]`, `[MEDICAL_ID]` - **Validation**: Every output is verified against an entity placeholder allowlist to ensure zero hallucinated redactions. - **Streaming (SSE)**: Set `stream: true` to receive progressive redaction via Server-Sent Events.

POST
/api/v1/text/redact

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

application/jsonRequired

domainAny properties in TextDomain

Optional industry vertical domain for vocabulary specialization. Defaults to 'general conversation' if omitted.

language
Required
Language

Language of the input text. The output text remains in this exact language with all detected PII replaced by standardized bracketed placeholders (e.g. [PERSON_NAME], [PHONE_NUMBER], [EMAIL], [BVN], [ACCOUNT_NUMBER]).

Value in: "Afrikaans" | "Amharic" | "Arabic" | "English" | "French" | "German" | "Hausa" | "Igbo" | "Isixhosa" | "Italian" | "Kinyarwanda" | "Sesotho" | "Setswana" | "Shona" | "Spanish" | "Swahili" | "Twi" | "Yoruba" | "Zulu"

streamStream

If true, streams output tokens as Server-Sent Events (SSE) text/event-stream. Supported for translation, redaction, and short/detailed summarization. (Not supported for structured summarization).

Default: false

text
Required
Text

Input transcript, dialogue, or document text to process.

Minimum length: 1
curl -X POST "https://api.orbitalsai.com/api/v1/text/redact" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "banking",
    "language": "English",
    "stream": false,
    "text": "Agent: Sannu, yaya zan taimaka maka yau?\nCustomer: Ina so in duba asusuna ne."
  }'

Redaction completed successfully.

{
  "job_id": 501,
  "missing_ranges": [],
  "model_name": "Perigee-1-text",
  "processing_time": 1.24,
  "result": "string",
  "result_structured": {
    "customer_issue": "Debit card not received after 5 business days.",
    "important_entities": [
      "Debit Card",
      "Express Delivery"
    ],
    "next_action": "Dispatch team tracking number resent via SMS.",
    "resolution_status": "in_progress",
    "sentiment": "neutral",
    "summary": "Customer called regarding a delayed debit card delivery."
  },
  "route": "single_pass",
  "sections": [
    {
      "end": 45.2,
      "failed": false,
      "index": 0,
      "start": 0,
      "summary": "Customer reported transfer failure."
    }
  ],
  "status": "complete",
  "units": {
    "failed": 0,
    "succeeded": 1,
    "total": 1
  },
  "usage": {
    "calls": 1,
    "completion_tokens": 58,
    "cost": 0.0004,
    "prompt_tokens": 142,
    "total_tokens": 200
  }
}

Guide

PII redaction guide