Installation
Quick Start
Async Support
Configuration
Methods
client.sanitize(text, entities=None, mode=“sanitize”)
Sanitize text by replacing PII with placeholders. ReturnsSanitizeResponse with .sanitized, .session_id, .entities_found, .entities, .processing_ms, .redacted.
Set mode="redact" to permanently remove PII. Redacted responses have session_id=None and cannot be rehydrated.
client.rehydrate(text, session_id)
Restore original PII to sanitized text. ReturnsRehydrateResponse with .text, .entities_restored, .processing_ms.
client.create_pattern(name, pattern, description="", examples=None)
Create a custom entity pattern. ReturnsPatternResponse with .pattern_id, .name, .status.
client.send_feedback(session_id, feedback_type, text_snippet, expected_type="")
Submit a single correction. ReturnsFeedbackResponse with .status.
client.get_insights()
Get pending insights and knowledge depth metrics. ReturnsInsightsResponse with .pending_conflicts, .proposed_improvements, .discovered_patterns, .knowledge_depth.
client.resolve_insight(insight_id, resolution, modifications=None, reason=None)
Resolve an insight.resolution is "approve", "refine", or "reject".
Batch Corrections
Chain corrections on aSanitizeResponse and submit them all at once:

