Skip to main content
POST
Python
Async operation: Anonymization run created and submitted. Returns the run ID immediately. Poll GET /api/dataframer/anonymization-runs/{run_id}/ until status is SUCCEEDED or FAILED.

Authorizations

Authorization
string
header
required

API Key authentication. Format: "Bearer YOUR_API_KEY"

Body

application/json

Request body for creating an anonymization run.

dataset_id
string<uuid>
required

UUID of the seed dataset to anonymize.

pii_types
string[]
required

List of PII/PHI entity types to detect and mask (e.g. ["first_name", "email", "phone_number"]). All values must be lowercase.

detection_method
enum<string>
default:pii_m1
required

Entity detection method. pii_m1 is the default and recommended option. Use llm or all when you need LLM-based detection; supply llm_model_name in that case.

Available options:
pii_m1,
llm,
all
llm_model_name
string

LLM model name. Required when detection_method includes llm.

mask_config
object

Optional per-entity-type masking strategy, e.g. {"first_name": "<FIRST_NAME>", "email": "<EMAIL>"}. Defaults to redact all.

threshold
number<float>
default:0.3

Confidence threshold for entity detection (0.0–1.0). Lower values detect more entities; higher values reduce false positives.

Required range: 0 <= x <= 1

Response

Anonymization run created

id
string<uuid>

Unique identifier for the anonymization run.

status
enum<string>

Current status of the anonymization run.

Available options:
PENDING,
PROCESSING,
SUCCEEDED,
FAILED
dataset_id
string<uuid> | null

UUID of the seed dataset being anonymized.

dataset_name
string | null

Name of the seed dataset.

pii_types
string[]

List of PII/PHI entity types being detected.

detection_method
string

Entity detection method used.

llm_model_name
string | null

LLM model name (when detection_method includes llm).

created_by_email
string<email> | null

Email of the user who created this run.

duration_seconds
integer | null

Time taken to complete the run in seconds. Null until completed.

results
object | null

Anonymization results once the run completes.

anonymized_files
object[]

List of anonymized output files produced by the run. Empty when content_unavailable_reason is set.

completed_at
string<date-time> | null

When the run completed (succeeded or failed).

created_at
string<date-time>

When the run was created.

content_location
object | null

Where the run's output is stored in your own cloud (null unless your deployment is customer-hosted)

content_unavailable_reason
enum<string> | null

Set when results.entities_found and anonymized_files are empty because they are stored in your own cloud, not because no PII was found. The counts in results are still complete. Absent or null otherwise. The Python SDK reads the text from your data plane, fills the fields and clears this

Available options:
result_content_in_data_plane