Skip to Content
API ReferencePOST /redact

Redact PII and protected-class proxies

POST /redact

Strip names, contact details, photo references, gendered language, age signals, and other protected-class proxies for bias-free evaluation, replacing each with a neutral placeholder and returning a categorized list of removals. Accepts text, url, or file.

Cost: 3 credits.

Request body

FieldTypeDescription
textstringRaw document text. HTML is stripped to visible text before processing.
urlstringhttp(s) URL of a publicly reachable document (PDF or web page). Redirects followed, 25s fetch timeout, 10MB cap; HTML is stripped to visible text before the size limit is applied.
filestringBase64-encoded document bytes (PDF or plain text; 10MB cap). No data-URI prefix, and no multipart/form-data.

Example request

curl -X POST "https://api.rezmatch.ai/redact" \ -H "x-access-key: $TALENTKIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "John Smith, 45, graduated 2003. He is an expert in Python." }'

Example response

{ "success": true, "data": { "redacted_text": "[NAME], [AGE], graduated [DATE]. [PRONOUN] is an expert in Python.", "removed": [ { "category": "name", "original": "John Smith" }, { "category": "age_proxy", "original": "45" }, { "category": "gender_proxy", "original": "He" } ] }, "credits_used": 3, "request_id": "req_1f6f1151-81c7-47a8-8086-88de98682bcd" }

Errors

StatusMeaning
401invalid_key — missing, unknown, or revoked access key
402insufficient_credits — top up in the dashboard; the failed call is not charged

All errors share the error envelope.

Try it

Open this endpoint in the interactive playground  — requests run with your API key.

Last updated on