PHI De-identification API

Automatically detect and remove protected health information from clinical text. Strip names, dates, SSNs, phone numbers, and other identifiers before processing, storing, or sharing patient data.

How It Works

Send clinical text to the anonymization endpoint and get back de-identified text with all PHI replaced by safe placeholders, plus a list of every detected entity.

Input

John Smith (DOB 03/15/1980) was
seen at 123 Main St, Springfield.
SSN: 456-78-9012. Phone: 555-0199.
Dx: Type 2 diabetes mellitus.

Output

[NAME] (DOB [DATE]) was
seen at [ADDRESS], [ADDRESS].
SSN: [SSN]. Phone: [PHONE].
Dx: Type 2 diabetes mellitus.

Detected PHI Types

The API detects and masks the following categories of protected health information.

Names

Patient names, provider names, relative names

Dates

Dates of birth, admission dates, appointment dates

SSNs

Social Security numbers

Phone Numbers

Home, mobile, and work phone numbers

Email Addresses

Personal and work email addresses

Physical Addresses

Street addresses, cities, ZIP codes

Medical Record Numbers

MRNs and other patient identifiers

Ages

Patient ages and age references

Code Example

De-identify clinical text in one SDK call.

TypeScript

import { AutoICD } from "autoicd-js";

const client = new AutoICD({ apiKey: "sk_..." });

const result = await client.anonymize(
  "John Smith (DOB 03/15/1980) was seen at 123 Main St."
);

console.log(result.anonymized_text);
// "[NAME] (DOB [DATE]) was seen at [ADDRESS]."

console.log(result.entities);
// [{ text: "John Smith", label: "NAME", start: 0, end: 10 }, ...]

Python

from autoicd import AutoICD

client = AutoICD(api_key="sk_...")

result = client.anonymize(
    "John Smith (DOB 03/15/1980) was seen at 123 Main St."
)

print(result.anonymized_text)
# "[NAME] (DOB [DATE]) was seen at [ADDRESS]."

HIPAA Compliance

All data is processed in memory only. Never stored, logged, or used for model training. Every request is encrypted in transit with TLS.

Business Associate Agreements (BAAs) are available for Pro plan users. The de-identification endpoint is designed to help you meet Safe Harbor and Expert Determination requirements under the HIPAA Privacy Rule.

De-identify clinical text in seconds

Free 7-day trial. No credit card required. Available on all plans.