Endpoint: POST /sanitize
Purpose: Redacts sensitive information based on context and domain.
is_sensitive: Indicates if sensitive data was detected.
context_mappings: Redactions generated by the API. To be used for de-sanitization and subsequent sanitization API calls
sanitized_text: Text with sensitive details contextually redacted.
sanitization_result:
status: Success if the sanitization was done successfully
reason: If sanitization status is Fail, reason for it. Some reasons:
curl -X POST "https://api.wald.ai/sanitize" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $WALD_API_KEY" \ -d '{ "text": "The doctor reviewed the medical report of John Doe, a 65 year old male, who presented with symptoms of chest pain and shortness of breath.Based on the findings, the patient has been advised to follow up with a cardiologist and adhere to a low-sodium diet. .", "domain": "Health", "context": "", "context_mappings": "" }'
{ "is_sensitive": true, "sanitization_result": { "status": "Success", "reason": "" }, "context_mappings": { "[REDACTED AGE1]": "65", "REDACTED PATIENT1]": "John Doe" }, “sanitized_text”: “The doctor reviewed the medical report of [REDACTED PATIENT1], a [REDACTED AGE1] year old male, who presented with symptoms of chest pain and shortness of breath.Based on the findings, the patient has been advised to follow up with a cardiologist and adhere to a low-sodium diet.”}
Endpoint: POST /desanitize
Purpose: Reconstructs original text from sanitized input using obfuscation maps.
curl -X POST "https://api.wald.ai/desanitize" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $WALD_API_KEY" \ -d '{ "redacted_text": "The doctor reviewed the medical report of [REDACTED PATIENT1], a [REDACTED AGE1] year old male, who presented with symptoms of chest pain and shortness of breath.Based on the findings, the patient has been advised to follow up with a cardiologist and adhere to a low-sodium diet", "context_mappings": { "[REDACTED AGE1]": "65", "[REDACTED PATIENT1]": "John Doe" } }'
{ "desanitized_text": "The doctor reviewed the medical report of John Doe, a 65 year old male, who presented with symptoms of chest pain and shortness of breath.Based on the findings, the patient has been advised to follow up with a cardiologist and adhere to a low-sodium diet.", }
Write to us at questions@wald.ai with questions or feedback.