Getting Started
Get up and running with Expunct in four steps.
1. Get an API key
Create an API key from the dashboard or via the API:
curl -X POST https://api.pii-redactor.dev/api/v1/api-keys \
-H "Content-Type: application/json" \
-d '{"name": "my-first-key"}'API keys use the format pk_live_... for production or pk_test_... for testing.
2. Install an SDK
Python
pip install pii-redactor-sdk3. Redact text
Python
from pii_redactor_sdk import PiiRedactor
client = PiiRedactor(api_key="pk_live_...")
result = client.redact.text(
text="John Smith's email is john@example.com and SSN is 123-45-6789",
)
print(result.redacted_text)
# "[PERSON]'s email is [EMAIL_ADDRESS] and SSN is [US_SSN]"4. Check results
The response includes the redacted text and a list of findings:
{
"redacted_text": "[PERSON]'s email is [EMAIL_ADDRESS] and SSN is [US_SSN]",
"findings": [
{
"entity_type": "PERSON",
"text": "John Smith",
"start": 0,
"end": 10,
"score": 0.95
},
{
"entity_type": "EMAIL_ADDRESS",
"text": "john@example.com",
"start": 22,
"end": 38,
"score": 1.0
},
{
"entity_type": "US_SSN",
"text": "123-45-6789",
"start": 47,
"end": 58,
"score": 1.0
}
]
}Each finding includes:
- entity_type — the category of PII detected (see Entity Types for the full list)
- text — the original text that was matched
- start / end — character offsets in the original text
- score — confidence score between 0 and 1
Next steps
- Browse the full list of Entity Types to understand what Expunct detects
- Learn about Workflows for file, batch, and policy-based redaction
- Explore the API Reference for all available endpoints
- Set up the Python SDK or Node.js SDK in your project
- Connect to Claude Code via MCP for AI-assisted redaction