Text

PII redaction

Replace supported sensitive values with stable placeholders using Perigee-1-text.

import os
import orbitalsai
 
client = orbitalsai.Client(api_key=os.environ["ORBITALSAI_API_KEY"])
 
redacted = client.redact(
    text="Amina Yusuf can be reached at amina@example.com or 08012345678.",
    language="English",
)
 
print(redacted.text)
[PERSON_NAME] can be reached at [EMAIL] or [PHONE_NUMBER].

Redaction applies the full supported placeholder set in one operation and keeps the surrounding text in its source language. It does not accept a user-selected subset of entity types.

Supported placeholders

[PERSON_NAME], [PHONE_NUMBER], [EMAIL], [ADDRESS], [ACCOUNT_NUMBER], [TRANSACTION_ID], [GOVERNMENT_ID], [CARD_NUMBER], [BVN], [DATE_OF_BIRTH], [CUSTOMER_ID], [EMPLOYEE_ID], [STUDENT_ID], [POLICY_NUMBER], and [MEDICAL_ID].

REST request

curl -X POST "https://api.orbitalsai.com/api/v1/text/redact" \
  -H "Authorization: Bearer $ORBITALSAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "My account number is 0123456789.",
    "language": "English",
    "stream": false
  }'

The operation returns status, redacted text in result, usage, processing time, and model metadata. Ambiguous text may remain unchanged; review redaction output before relying on it as a sole compliance control.

Next steps

On this page