Send text and get the same text back with personal information replaced or
removed: names, email addresses, phone numbers, street addresses, URLs, dates
and account numbers such as cards, IBANs and US Social Security numbers.Redaction runs on ZeroDrift’s own PII detector. Your text is not sent to a
third-party model API.For a walkthrough with four test cases you can run, including a patient
record, see Remove PII and PHI.
Detection is best-effort. A redacted result is not a guarantee of
complete anonymization. Review the known gaps before you rely
on it for a regulated workflow.
Request Body
string
default:"Email Maria Gonzalez at maria@example.com"
required
Text to redact, up to 100,000 characters. Empty or whitespace-only text is
valid and returns no findings.
string
default:"label"
How each finding is replaced:
Style
Email Maria Gonzalez at maria@example.com becomes
label (default)
Email [PRIVATE_PERSON] at [PRIVATE_EMAIL]
mask
Email [REDACTED] at [REDACTED]
remove
Email at
Any other value returns 422 invalid_style.
string
default:"async"
sync returns the redacted text in the response for content up to 20,000
characters. async (the default) returns 202 with a job_id to poll via
Get Verdict. See
Sync and async.
string
Which detector queue the request joins: realtime work is served first,
standard waits behind it. Defaults to realtime for sync and standard
for async. Use standard for bulk jobs so they don’t slow down interactive
callers.
object
Optional free-form object stored on the job, for example your own message ID.
At most 8,192 bytes as JSON.
Response
A completed redaction returns 200 with the result nested under result.
Polling an async job returns the same envelope.
string
Always v3.
string
Unique identifier for the redaction job.
string
Always redact.
string
queued, processing, completed or failed.
string
Mode the request was actually processed in. A sync request that fell back
reports async.
string
The detector queue the request joined: realtime or standard.
string
Time the job was submitted (ISO 8601).
object
Where to poll for the result (async only): method is GET, url is
/api/v3/jobs/{job_id}.
string
Present when status is failed.
object
Present when status is completed.
Show result properties
string
The redacted text. Returned in the sync response and when polling a
completed async job. A completed sync job stores no text, so polling it
afterwards returns the summary without redacted.
object
What was found, as counts only. Removed values are never returned.
Show summary properties
integer
Number of findings.
object
Findings per category, for example private_person,
private_email, private_phone, private_address, private_url,
private_date and account_number.
object
Account numbers confirmed by a checksum or format check, by type:
card, iban, us_ssn, us_itin, us_routing_number, us_ein
and bic. For example {"iban": 1, "us_ssn": 1}.
object
name and revision of the detector that ran.
string
Always reminds you that detection is best-effort.
integer
Billed units for this job.
object
Billed cost for this job: currency and amount.
Sync and async
You send
What happens
mode: "sync", content up to 20,000 characters
200 with result.redacted in the response. ZeroDrift stores no text.
mode: "sync", content over 20,000 characters
Falls back to async: 202 with a job_id.
mode: "sync" while the detector is starting up
Falls back to async: 202 with a job_id. The job keeps realtime priority.
mode: "async"
202 with a job_id. Poll Get Verdict until status is completed or failed. Results are kept for 24 hours.
Always handle a 202, even when you send mode: "sync".A redaction job can be read only with the API key that submitted it.
There is no fallback engine. If the detector is unavailable, a sync
request returns 503 detector_unavailable and an async job ends
failed. ZeroDrift never returns unredacted text in place of a result.
categories or return_spans was sent. Neither is available yet.
503
detector_unavailable
Sync only. The detector couldn’t answer. Retry, or send mode: "async".
Both full-access and read-only API keys can call this endpoint. Refused
requests and failed jobs are not billed.
Pricing
Redaction is billed at $0.01 per message, where a message is up to 2,000
input tokens of your text, rounded up. Each completed job reports its charge in
result.units and result.cost. See Pricing.
Known gaps
The detector combines a language model with checksum and pattern rules. These
are the cases it is known to miss or handle weakly:
Organization names are not reliably detected. A customer name that is a
company may be left in place.
Routing numbers, EINs and SWIFT/BIC codes are confirmed only when a word
naming them comes just before the number, such as routing, EIN, tax ID
or SWIFT. Without one, they are left to the model and may be missed.
Cards: Maestro and UnionPay numbers, and card numbers inside a longer run
of digits, may be missed.
Addresses are matched by rule only when they include a street-type word
such as Street or Avenue. A PO box, a building name or a bare city and ZIP
code is left to the model.
Not covered by the rules: internal reference IDs, CVVs, PINs and
lowercase first names in chat. These depend on the model alone.
Languages: only English and Dutch have been measured.
Example
curl -X POST "https://api.zerodrift.ai/api/v3/content/redact" \ -H "x-api-key: $ZERODRIFT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "content": "Email Maria Gonzalez at maria@example.com", "style": "label", "mode": "sync" }'
import osimport timeimport requestsAPI = "https://api.zerodrift.ai"HEADERS = { "x-api-key": os.environ["ZERODRIFT_API_KEY"], "Content-Type": "application/json",}resp = requests.post( f"{API}/api/v3/content/redact", headers=HEADERS, json={ "content": "Email Maria Gonzalez at maria@example.com", "style": "label", "mode": "sync", }, timeout=60,)resp.raise_for_status()job = resp.json()# A sync request can still fall back to async (202), so poll if needed.while job["status"] in ("queued", "processing"): time.sleep(2) resp = requests.get( f"{API}/api/v3/jobs/{job['job_id']}", headers=HEADERS, timeout=30 ) resp.raise_for_status() job = resp.json()if job["status"] == "failed": raise RuntimeError(job.get("error"))print(job["result"].get("redacted"))print(job["result"]["summary"])
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ZeroDrift Enforcement API","description":"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/zerodrift/EnMFM7yTopP4lGmD/logo/ZD_White_Transparent.png?fit=max\u0026auto=format\u0026n=EnMFM7yTopP4lGmD\u0026q=85\u0026s=8a3a1cfcd216c0a056b6a1cd0c50a332","dark":"https://mintcdn.com/zerodrift/EnMFM7yTopP4lGmD/logo/ZD_Black_Transparent.png?fit=max\u0026auto=format\u0026n=EnMFM7yTopP4lGmD\u0026q=85\u0026s=dd2ae5c915064ad7ebf1aa495eb2efce"},"favicon":"https://mintcdn.com/zerodrift/C1CP0SqlGtEDTLZM/favicon.svg?fit=max\u0026auto=format\u0026n=C1CP0SqlGtEDTLZM\u0026q=85\u0026s=3ffcd8394a2e8995fcc413d960e17117","api":{"examples":{"defaults":"required"},"mdx":{"auth":{"method":"key","name":"x-api-key"},"server":"https://api.zerodrift.ai"}},"navbar":{"links":[{"href":"mailto:support@zerodrift.ai","label":"Support"},{"href":"/changelog","label":"Changelog"}],"primary":{"type":"button","label":"Open Command","href":"https://app.zerodrift.ai"}},"footer":{},"seo":{"metatags":{"og:description":"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications","slack-app-id":"A0CJQ2CUV8C"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"zerodrift","hasAudioNarration":false,"actualSubdomain":"zerodrift","customDomains":["docs.zerodrift.com"],"gitSource":{"type":"github","owner":"zerodriftai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b0f455395a7b0367e387aae","clientVersion":"0.0.4397","searchFilterCounts":[{"language":"default","tag":"API reference","count":25},{"language":"default","tag":"Guides","count":24},{"language":"default","tag":"Plugins","count":15},{"language":"default","tag":"Getting Started","count":10},{"language":"default","tag":"Import a Policy","count":7},{"language":"default","tag":"Rules","count":7},{"language":"default","tag":"Claude","count":5},{"language":"default","tag":"ChatGPT and Codex","count":5},{"language":"default","tag":"Enforce and Audit Content","count":5},{"language":"default","tag":"Slack","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/redact/redact-text","slug":"/api-reference/redact/redact-text","pageMetadata":{"title":"Redact PII","description":"Remove personal information from text before you store, share or send it to another model.","api":"POST /api/v3/content/redact","href":"/api-reference/redact/redact-text"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Remove personal information from text before you store, share or send it to another model.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,Note,ParamField,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Send text and get the same text back with personal information replaced or\nremoved: names, email addresses, phone numbers, street addresses, URLs, dates\nand account numbers such as cards, IBANs and US Social Security numbers.`}),`\n`,_jsx(_components.p,{children:`Redaction runs on ZeroDrift’s own PII detector. Your text is not sent to a\nthird-party model API.`}),`\n`,_jsxs(_components.p,{children:[`For a walkthrough with four test cases you can run, including a patient\nrecord, see `,_jsx(_components.a,{href:`/guides/redact-pii-and-phi`,children:`Remove PII and PHI`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Detection is best-effort. A redacted result is `,_jsx(_components.strong,{children:`not`}),` a guarantee of\ncomplete anonymization. Review the `,_jsx(_components.a,{href:`#known-gaps`,children:`known gaps`}),` before you rely\non it for a regulated workflow.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`content`,type:`string`,required:true,default:`Email Maria Gonzalez at maria@example.com`,id:`param-content`,children:_jsx(_components.p,{children:`Text to redact, up to 100,000 characters. Empty or whitespace-only text is\nvalid and returns no findings.`})}),`\n`,_jsxs(ParamField,{body:`style`,type:`string`,default:`label`,id:`param-style`,children:[_jsx(_components.p,{children:`How each finding is replaced:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Style`}),_jsxs(_components.th,{children:[_jsx(_components.code,{children:`Email Maria Gonzalez at maria@example.com`}),` becomes`]})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`label`}),` (default)`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Email [PRIVATE_PERSON] at [PRIVATE_EMAIL]`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mask`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Email [REDACTED] at [REDACTED]`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`remove`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Email at `})})]})]})]}),_jsxs(_components.p,{children:[`Any other value returns `,_jsx(_components.code,{children:`422 invalid_style`}),`.`]})]}),`\n`,_jsx(ParamField,{body:`mode`,type:`string`,default:`async`,id:`param-mode`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`sync`}),` returns the redacted text in the response for content up to 20,000\ncharacters. `,_jsx(_components.code,{children:`async`}),` (the default) returns `,_jsx(_components.code,{children:`202`}),` with a `,_jsx(_components.code,{children:`job_id`}),` to poll via\n`,_jsx(_components.a,{href:`/api-reference/validate/get-results`,children:`Get Verdict`}),`. See\n`,_jsx(_components.a,{href:`#sync-and-async`,children:`Sync and async`}),`.`]})}),`\n`,_jsx(ParamField,{body:`priority`,type:`string`,id:`param-priority`,children:_jsxs(_components.p,{children:[`Which detector queue the request joins: `,_jsx(_components.code,{children:`realtime`}),` work is served first,\n`,_jsx(_components.code,{children:`standard`}),` waits behind it. Defaults to `,_jsx(_components.code,{children:`realtime`}),` for `,_jsx(_components.code,{children:`sync`}),` and `,_jsx(_components.code,{children:`standard`}),`\nfor `,_jsx(_components.code,{children:`async`}),`. Use `,_jsx(_components.code,{children:`standard`}),` for bulk jobs so they don’t slow down interactive\ncallers.`]})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsx(_components.p,{children:`Optional free-form object stored on the job, for example your own message ID.\nAt most 8,192 bytes as JSON.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`A completed redaction returns `,_jsx(_components.code,{children:`200`}),` with the result nested under `,_jsx(_components.code,{children:`result`}),`.\nPolling an async job returns the same envelope.`]}),`\n`,_jsx(ResponseField,{name:`api_version`,type:`string`,id:`param-api-version`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`v3`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`job_id`,type:`string`,id:`param-job-id`,children:_jsx(_components.p,{children:`Unique identifier for the redaction job.`})}),`\n`,_jsx(ResponseField,{name:`job_type`,type:`string`,id:`param-job-type`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`redact`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`queued`}),`, `,_jsx(_components.code,{children:`processing`}),`, `,_jsx(_components.code,{children:`completed`}),` or `,_jsx(_components.code,{children:`failed`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`mode`,type:`string`,id:`param-mode-1`,children:_jsxs(_components.p,{children:[`Mode the request was actually processed in. A `,_jsx(_components.code,{children:`sync`}),` request that fell back\nreports `,_jsx(_components.code,{children:`async`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`priority`,type:`string`,id:`param-priority-1`,children:_jsxs(_components.p,{children:[`The detector queue the request joined: `,_jsx(_components.code,{children:`realtime`}),` or `,_jsx(_components.code,{children:`standard`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`submitted_at`,type:`string`,id:`param-submitted-at`,children:_jsx(_components.p,{children:`Time the job was submitted (ISO 8601).`})}),`\n`,_jsx(ResponseField,{name:`poll`,type:`object`,id:`param-poll`,children:_jsxs(_components.p,{children:[`Where to poll for the result (async only): `,_jsx(_components.code,{children:`method`}),` is `,_jsx(_components.code,{children:`GET`}),`, `,_jsx(_components.code,{children:`url`}),` is\n`,_jsx(_components.code,{children:`/api/v3/jobs/{job_id}`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error`,children:_jsxs(_components.p,{children:[`Present when `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`failed`}),`.`]})}),`\n`,_jsxs(ResponseField,{name:`result`,type:`object`,id:`param-result`,children:[_jsxs(_components.p,{children:[`Present when `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`completed`}),`.`]}),_jsxs(Expandable,{title:`result properties`,children:[_jsx(ResponseField,{name:`redacted`,type:`string`,id:`param-redacted`,children:_jsxs(_components.p,{children:[`The redacted text. Returned in the `,_jsx(_components.code,{children:`sync`}),` response and when polling a\ncompleted async job. A completed sync job stores no text, so polling it\nafterwards returns the summary without `,_jsx(_components.code,{children:`redacted`}),`.`]})}),_jsxs(ResponseField,{name:`summary`,type:`object`,id:`param-summary`,children:[_jsx(_components.p,{children:`What was found, as counts only. Removed values are never returned.`}),_jsxs(Expandable,{title:`summary properties`,children:[_jsx(ResponseField,{name:`total`,type:`integer`,id:`param-total`,children:_jsx(_components.p,{children:`Number of findings.`})}),_jsx(ResponseField,{name:`by_category`,type:`object`,id:`param-by-category`,children:_jsxs(_components.p,{children:[`Findings per category, for example `,_jsx(_components.code,{children:`private_person`}),`,\n`,_jsx(_components.code,{children:`private_email`}),`, `,_jsx(_components.code,{children:`private_phone`}),`, `,_jsx(_components.code,{children:`private_address`}),`, `,_jsx(_components.code,{children:`private_url`}),`,\n`,_jsx(_components.code,{children:`private_date`}),` and `,_jsx(_components.code,{children:`account_number`}),`.`]})}),_jsx(ResponseField,{name:`validated_identifiers`,type:`object`,id:`param-validated-identifiers`,children:_jsxs(_components.p,{children:[`Account numbers confirmed by a checksum or format check, by type:\n`,_jsx(_components.code,{children:`card`}),`, `,_jsx(_components.code,{children:`iban`}),`, `,_jsx(_components.code,{children:`us_ssn`}),`, `,_jsx(_components.code,{children:`us_itin`}),`, `,_jsx(_components.code,{children:`us_routing_number`}),`, `,_jsx(_components.code,{children:`us_ein`}),`\nand `,_jsx(_components.code,{children:`bic`}),`. For example `,_jsx(_components.code,{children:`{\"iban\": 1, \"us_ssn\": 1}`}),`.`]})})]})]}),_jsx(ResponseField,{name:`detector`,type:`object`,id:`param-detector`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`name`}),` and `,_jsx(_components.code,{children:`revision`}),` of the detector that ran.`]})}),_jsx(ResponseField,{name:`notice`,type:`string`,id:`param-notice`,children:_jsx(_components.p,{children:`Always reminds you that detection is best-effort.`})}),_jsx(ResponseField,{name:`units`,type:`integer`,id:`param-units`,children:_jsx(_components.p,{children:`Billed units for this job.`})}),_jsx(ResponseField,{name:`cost`,type:`object`,id:`param-cost`,children:_jsxs(_components.p,{children:[`Billed cost for this job: `,_jsx(_components.code,{children:`currency`}),` and `,_jsx(_components.code,{children:`amount`}),`.`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`sync-and-async`,children:`Sync and async`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`You send`}),_jsx(_components.th,{children:`What happens`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`mode: \"sync\"`}),`, content up to 20,000 characters`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`200`}),` with `,_jsx(_components.code,{children:`result.redacted`}),` in the response. ZeroDrift stores no text.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`mode: \"sync\"`}),`, content over 20,000 characters`]}),_jsxs(_components.td,{children:[`Falls back to async: `,_jsx(_components.code,{children:`202`}),` with a `,_jsx(_components.code,{children:`job_id`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`mode: \"sync\"`}),` while the detector is starting up`]}),_jsxs(_components.td,{children:[`Falls back to async: `,_jsx(_components.code,{children:`202`}),` with a `,_jsx(_components.code,{children:`job_id`}),`. The job keeps `,_jsx(_components.code,{children:`realtime`}),` priority.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mode: \"async\"`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`202`}),` with a `,_jsx(_components.code,{children:`job_id`}),`. Poll `,_jsx(_components.a,{href:`/api-reference/validate/get-results`,children:`Get Verdict`}),` until `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`completed`}),` or `,_jsx(_components.code,{children:`failed`}),`. Results are kept for 24 hours.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Always handle a `,_jsx(_components.code,{children:`202`}),`, even when you send `,_jsx(_components.code,{children:`mode: \"sync\"`}),`.`]}),`\n`,_jsx(_components.p,{children:`A redaction job can be read only with the API key that submitted it.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`There is no fallback engine. If the detector is unavailable, a `,_jsx(_components.code,{children:`sync`}),`\nrequest returns `,_jsx(_components.code,{children:`503 detector_unavailable`}),` and an `,_jsx(_components.code,{children:`async`}),` job ends\n`,_jsx(_components.code,{children:`failed`}),`. ZeroDrift never returns unredacted text in place of a result.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsx(_components.p,{children:`No error response echoes your content.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`invalid_json`}),`, `,_jsx(_components.code,{children:`missing_content`})]}),_jsxs(_components.td,{children:[`The body isn’t valid JSON, or `,_jsx(_components.code,{children:`content`}),` is missing.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`402`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`insufficient_credits`})}),_jsx(_components.td,{children:`The workspace has no balance left.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`redact_not_enabled`})}),_jsx(_components.td,{children:`Redaction isn’t enabled for this workspace.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`413`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`content_too_large`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`content`}),` is over 100,000 characters.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`413`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`metadata_too_large`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`metadata`}),` is over 8,192 bytes.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`invalid_content`}),`, `,_jsx(_components.code,{children:`invalid_style`}),`, `,_jsx(_components.code,{children:`invalid_mode`}),`, `,_jsx(_components.code,{children:`invalid_priority`}),`, `,_jsx(_components.code,{children:`invalid_metadata`})]}),_jsx(_components.td,{children:`A field has the wrong type or value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unsupported_field`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`categories`}),` or `,_jsx(_components.code,{children:`return_spans`}),` was sent. Neither is available yet.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`503`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`detector_unavailable`})}),_jsxs(_components.td,{children:[`Sync only. The detector couldn’t answer. Retry, or send `,_jsx(_components.code,{children:`mode: \"async\"`}),`.`]})]})]})]}),`\n`,_jsx(_components.p,{children:`Both full-access and read-only API keys can call this endpoint. Refused\nrequests and failed jobs are not billed.`}),`\n`,_jsx(Heading,{level:`2`,id:`pricing`,children:`Pricing`}),`\n`,_jsxs(_components.p,{children:[`Redaction is billed at `,_jsx(_components.strong,{children:`$0.01 per message`}),`, where a message is up to 2,000\ninput tokens of your text, rounded up. Each completed job reports its charge in\n`,_jsx(_components.code,{children:`result.units`}),` and `,_jsx(_components.code,{children:`result.cost`}),`. See `,_jsx(_components.a,{href:`/pricing#pii-redaction`,children:`Pricing`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`known-gaps`,children:`Known gaps`}),`\n`,_jsx(_components.p,{children:`The detector combines a language model with checksum and pattern rules. These\nare the cases it is known to miss or handle weakly:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Organization names`}),` are not reliably detected. A customer name that is a\ncompany may be left in place.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Routing numbers, EINs and SWIFT/BIC codes`}),` are confirmed only when a word\nnaming them comes just before the number, such as `,_jsx(_components.code,{children:`routing`}),`, `,_jsx(_components.code,{children:`EIN`}),`, `,_jsx(_components.code,{children:`tax ID`}),`\nor `,_jsx(_components.code,{children:`SWIFT`}),`. Without one, they are left to the model and may be missed.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cards`}),`: Maestro and UnionPay numbers, and card numbers inside a longer run\nof digits, may be missed.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Addresses`}),` are matched by rule only when they include a street-type word\nsuch as `,_jsx(_components.code,{children:`Street`}),` or `,_jsx(_components.code,{children:`Avenue`}),`. A PO box, a building name or a bare city and ZIP\ncode is left to the model.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Not covered by the rules`}),`: internal reference IDs, CVVs, PINs and\nlowercase first names in chat. These depend on the model alone.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Languages`}),`: only English and Dutch have been measured.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.zerodrift.ai/api/v3/content/redact\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ZERODRIFT_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\": \"Email Maria Gonzalez at maria@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"style\": \"label\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mode\": \"sync\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`38`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`38`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`API`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.zerodrift.ai\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ZERODRIFT_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`resp `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`API`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v3/content/redact\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Email Maria Gonzalez at maria@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"style\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sync\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`resp.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`job `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.json()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# A sync request can still fall back to async (202), so poll if needed.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` job[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"queued\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"processing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.get(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`API`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v3/jobs/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`job[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'job_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` job `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.json()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` job[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` RuntimeError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(job.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(job[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redacted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(job[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})})]}),`\n`,_jsx(CodeBlock,{filename:`200 Response`,numberOfLines:`21`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"api_version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"v3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"job_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a1b2c3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"job_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redact\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sync\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"priority\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"realtime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"submitted_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-02T16:30:00+00:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"redacted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Email [PRIVATE_PERSON] at [PRIVATE_EMAIL]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"by_category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"private_person\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"private_email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"validated_identifiers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detector\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"privacy-filter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"revision\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7ffa9a04\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"notice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Best-effort detection. Not a guarantee of complete anonymization.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"units\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0.01\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Redact PII","description":"Remove personal information from text before you store, share or send it to another model.","api":"POST /api/v3/content/redact","href":"/api-reference/redact/redact-text"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Sync and async","slug":"sync-and-async","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Pricing","slug":"pricing","depth":2,"children":[]},{"title":"Known gaps","slug":"known-gaps","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Redact PII","path":"/api/v3/content/redact","servers":[{"url":"https://api.zerodrift.ai"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"x-api-key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"content":[{"type":"string","description":"Text to redact, up to 100,000 characters. Empty or whitespace-only text is valid and returns no findings.","required":true}],"style":[{"type":"string","description":"How each finding is replaced: Style `Email Maria Gonzalez at maria@example.com` becomes `label` (default) `Email [PRIVATE_PERSON] at [PRIVATE_EMAIL]` `mask` `Email [REDACTED] at [REDACTED]` `remove` `Email at` Any other value returns `422 invalid_style` ."}],"mode":[{"type":"string","description":"`sync` returns the redacted text in the response for content up to 20,000 characters. `async` (the default) returns `202` with a `job_id` to poll via Get Verdict . See Sync and async ."}],"priority":[{"type":"string","description":"Which detector queue the request joins: `realtime` work is served first, `standard` waits behind it. Defaults to `realtime` for `sync` and `standard` for `async` . Use `standard` for bulk jobs so they don’t slow down interactive callers."}],"metadata":[{"type":"object","properties":{},"description":"Optional free-form object stored on the job, for example your own message ID. At most 8,192 bytes as JSON."}]}}],"examples":{"example":{"value":{"content":"\u003cstring>","style":"\u003cstring>","mode":"\u003cstring>","priority":"\u003cstring>","metadata":{}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"api_version":[{"type":"string","description":"Always `v3` ."}],"job_id":[{"type":"string","description":"Unique identifier for the redaction job."}],"job_type":[{"type":"string","description":"Always `redact` ."}],"status":[{"type":"string","description":"`queued` , `processing` , `completed` or `failed` ."}],"mode":[{"type":"string","description":"Mode the request was actually processed in. A `sync` request that fell back reports `async` ."}],"priority":[{"type":"string","description":"The detector queue the request joined: `realtime` or `standard` ."}],"submitted_at":[{"type":"string","description":"Time the job was submitted (ISO 8601)."}],"poll":[{"type":"object","properties":{},"description":"Where to poll for the result (async only): `method` is `GET` , `url` is `/api/v3/jobs/{job_id}` ."}],"error":[{"type":"string","description":"Present when `status` is `failed` ."}],"result":[{"type":"object","properties":{"redacted":[{"type":"string","description":"The redacted text. Returned in the `sync` response and when polling a completed async job. A completed sync job stores no text, so polling it afterwards returns the summary without `redacted` ."}],"summary":[{"type":"object","properties":{"total":[{"type":"integer","description":"Number of findings."}],"by_category":[{"type":"object","properties":{},"description":"Findings per category, for example `private_person` , `private_email` , `private_phone` , `private_address` , `private_url` , `private_date` and `account_number` ."}],"validated_identifiers":[{"type":"object","properties":{},"description":"Account numbers confirmed by a checksum or format check, by type: `card` , `iban` , `us_ssn` , `us_itin` , `us_routing_number` , `us_ein` and `bic` . For example `{\"iban\": 1, \"us_ssn\": 1}` ."}]},"description":"What was found, as counts only. Removed values are never returned."}],"detector":[{"type":"object","properties":{},"description":"`name` and `revision` of the detector that ran."}],"notice":[{"type":"string","description":"Always reminds you that detection is best-effort."}],"units":[{"type":"integer","description":"Billed units for this job."}],"cost":[{"type":"object","properties":{},"description":"Billed cost for this job: `currency` and `amount` ."}]},"description":"Present when `status` is `completed` ."}]}}],"examples":{"example":{"value":{"api_version":"\u003cstring>","job_id":"\u003cstring>","job_type":"\u003cstring>","status":"\u003cstring>","mode":"\u003cstring>","priority":"\u003cstring>","submitted_at":"\u003cstring>","poll":{},"error":"\u003cstring>","result":{"redacted":"\u003cstring>","summary":{"total":123,"by_category":{},"validated_identifiers":{}},"detector":{},"notice":"\u003cstring>","units":123,"cost":{}}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"zerodrift","siteName":"ZeroDrift Enforcement API","title":"Redact PII - ZeroDrift Enforcement API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-01T22:08:24.756Z","originalFileLocation":"api-reference/redact/redact-text.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Remove personal information from text before you store, share or send it to another model.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ZeroDrift Enforcement API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Redact PII - ZeroDrift Enforcement API\">\u003cmeta data-mint-head property=\"og:description\" content=\"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ZeroDrift Enforcement API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.zerodrift.com/api-reference/redact/redact-text\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://zerodrift.mintlify.site/_mintlify/api/og/v2?division=Redact\u0026amp;title=Redact+PII\u0026amp;description=Remove+personal+information+from+text+before+you+store%2C+share+or+send+it+to+another+model.\u0026amp;theme=4a77b3342bf61dc8ad6b1fee\u0026amp;signature=f7c7535052e538dc95192b8d0b86ae4e1ffafa2670371f7958240b9aa0d6a518\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Redact PII - ZeroDrift Enforcement API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://zerodrift.mintlify.site/_mintlify/api/og/v2?division=Redact\u0026amp;title=Redact+PII\u0026amp;description=Remove+personal+information+from+text+before+you+store%2C+share+or+send+it+to+another+model.\u0026amp;theme=4a77b3342bf61dc8ad6b1fee\u0026amp;signature=f7c7535052e538dc95192b8d0b86ae4e1ffafa2670371f7958240b9aa0d6a518\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ZeroDrift Enforcement API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003cmeta data-mint-head name=\"slack-app-id\" content=\"A0CJQ2CUV8C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.zerodrift.com/api-reference/redact/redact-text\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/redact/redact-text.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.zerodrift.com/#organization\",\"name\":\"ZeroDrift Enforcement API\",\"url\":\"https://docs.zerodrift.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/zerodrift/EnMFM7yTopP4lGmD/logo/ZD_White_Transparent.png?fit=max\u0026auto=format\u0026n=EnMFM7yTopP4lGmD\u0026q=85\u0026s=8a3a1cfcd216c0a056b6a1cd0c50a332\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.zerodrift.com#website\",\"name\":\"ZeroDrift Enforcement API\",\"url\":\"https://docs.zerodrift.com\",\"publisher\":{\"@id\":\"https://docs.zerodrift.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.zerodrift.com/api-reference/redact/redact-text#webpage\",\"url\":\"https://docs.zerodrift.com/api-reference/redact/redact-text\",\"name\":\"Redact PII\",\"description\":\"Remove personal information from text before you store, share or send it to another model.\",\"dateModified\":\"2026-12-01T22:08:24.756Z\",\"isPartOf\":{\"@id\":\"https://docs.zerodrift.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.zerodrift.com/api-reference/redact/redact-text#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.zerodrift.com/api-reference/redact/redact-text#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"ZeroDrift Enforcement API\",\"item\":\"https://docs.zerodrift.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Redact PII\",\"item\":\"https://docs.zerodrift.com/api-reference/redact/redact-text\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.zerodrift.com/api-reference/redact/redact-text#apireference\",\"headline\":\"Redact PII\",\"name\":\"Redact PII\",\"description\":\"Remove personal information from text before you store, share or send it to another model.\",\"url\":\"https://docs.zerodrift.com/api-reference/redact/redact-text\",\"mainEntityOfPage\":{\"@id\":\"https://docs.zerodrift.com/api-reference/redact/redact-text#webpage\"},\"dateModified\":\"2026-12-01T22:08:24.756Z\",\"publisher\":{\"@id\":\"https://docs.zerodrift.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.zerodrift.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ZeroDrift Enforcement API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ZeroDrift Enforcement API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/redact/redact-text.md","siteName":"ZeroDrift Enforcement API","nav":{"global":{},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Plugins","pages":[{"title":"Plugins","href":"/codex-plugin"}]},{"tab":"API reference","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Errors","href":"/api-reference/errors"},{"title":"OpenAPI specification","href":"/api-reference/openapi"}]},{"group":"Enforce","pages":[{"title":"Enforce Content","api":"POST /api/v3/content/validate","href":"/api-reference/validate/validate-content"},{"title":"Get Verdict","description":"Retrieve the verdict for an enforcement job.","api":"GET /api/v3/jobs/{job_id}","href":"/api-reference/validate/get-results"}]},{"group":"Redact","pages":[{"title":"Redact PII","api":"POST /api/v3/content/redact","href":"/api-reference/redact/redact-text"}]},{"group":"Import a Policy","pages":[{"title":"Import Policy","description":"Upload a policy and extract enforceable rules.","api":"POST /api/policies/import","href":"/api-reference/custom-policies/import-policy"},{"title":"Get Import Presigned URL","api":"POST /api/policies/import/presigned_url","href":"/api-reference/custom-policies/import-presigned-url"},{"title":"Start Import","api":"POST /api/policies/import/start","href":"/api-reference/custom-policies/start-import"},{"title":"List Policy Imports","api":"GET /api/policies/import","href":"/api-reference/custom-policies/list-imports"},{"title":"Get Import Details","api":"GET /api/policies/import/{import_id}","href":"/api-reference/custom-policies/get-import-details"},{"title":"Edit Imported Rule","api":"PATCH /api/policies/import/{import_id}/rules/{rule_id}","href":"/api-reference/custom-policies/edit-imported-rule"},{"title":"Activate Rules","api":"POST /api/policies/import/{import_id}/activate","href":"/api-reference/custom-policies/activate-rules"}]},{"group":"Rules","pages":[{"title":"List Rules","api":"GET /api/policies/rules","href":"/api-reference/custom-policies/list-rules"},{"title":"Create Custom Rule","api":"POST /api/policies/rules","href":"/api-reference/custom-policies/create-rule"},{"title":"Get Custom Rule","api":"GET /api/policies/rules/{rule_id}","href":"/api-reference/custom-policies/get-rule"},{"title":"Edit Custom Rule","api":"PATCH /api/policies/rules/{rule_id}","href":"/api-reference/custom-policies/edit-rule"},{"title":"Delete Custom Rule","api":"DELETE /api/policies/rules/{rule_id}","href":"/api-reference/custom-policies/delete-rule"},{"title":"Deactivate Rules","api":"POST /api/policies/rules/deactivate","href":"/api-reference/custom-policies/deactivate-rules"},{"title":"Reactivate Rules","api":"POST /api/policies/rules/activate","href":"/api-reference/custom-policies/reactivate-rules"}]},{"group":"Rule Packs","pages":[{"title":"Rule Packs","api":"GET /api/rulepacks/","href":"/api-reference/rulepacks"}]},{"group":"Activity","pages":[{"title":"List Activity","api":"GET /api/activities","href":"/api-reference/activities/list-activities"},{"title":"Get Activity","api":"GET /api/activities/{activity_id}","href":"/api-reference/activities/get-activity"}]},{"group":"Training Studio","pages":[{"title":"Train Policy Adapter","api":"POST /api/policies/import/{import_id}/train","href":"/api-reference/training-studio/train-policy"},{"title":"Get Training Status","api":"GET /api/policies/import/{import_id}/train","href":"/api-reference/training-studio/get-training-status"}]}]}]},"basePath":"","title":"Redact PII - ZeroDrift Enforcement API","deploymentId":"dpl_GDNWf1tLGuMA7VZdZjLPVcJLRJgG","buildId":"dpl_GDNWf1tLGuMA7VZdZjLPVcJLRJgG","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DiWQR0Dw.js","snippetPresets-BmylJwUX.js","utils-C2fWuTLj.js","style-to-object-BY3JEAdk.js","utils-CSS9SJgm.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-B_HuAfYC.js","conditional-requirements-CFM0id0Q.js","cloneDeep-Bink-3az.js","_Uint8Array-DH8dt3QM.js","isObject-FP1Yky1u.js","ApiExamples-DKwL65Qp.js","usePlaygroundInputsStore-Byf7Wjg-.js","shallow-xQA3heHi.js","isEqual-CWFuCnsy.js","CodeSnippets-DrJ7GrW7.js","CodeSnippet-Bau4ZVdW.js","use-playground-group-access-BIWJdxB8.js","Page-DRR8sPxe.js","api-description-markdown-Bl6IXimh.js","DynamicMarkdown-CsDDjLGd.js","SectionHeading-CDNIUELf.js","MethodPill-B33MQrA3.js","getPastedJson-B5OQB7us.js","Check2Icon-lMIePS93.js","axios-CsQoIw0U.js"]}