For the complete documentation index, see llms.txt. This page is also available as Markdown.

v1/scrub-file

Redact sensitive information from an uploaded file. The file is parsed to extract its text content, which is then scrubbed and returned as a string. To redact a text string directly, use v1/scrub.

Request

The request must be multipart/form-data with two parts:

Part
Type
Description

file

file

The file to scrub. Required.

content

string

JSON object with filter options. Required (send {} to apply no filters).

Query parameters

Parameter
Description

redactionStyle

How to replace detected values. See Redaction styles below. Defaults to class.

key

Encryption key for the encrypted style. Must be exactly 32, 48, or 64 bytes. The raw query string value is used as the key — no hex decoding is applied.

content filter options

Only filters is supported in the content part.

Field
Type
Description

filters

string[]

Allow-list of element labels to redact. Omit or pass an empty array to redact every supported element.

Limits

Limit
Value

Multipart form size

32 MB


Redaction styles

Set ?redactionStyle= on the request. The value is case-insensitive. See Redaction Methodologies for details on each style.

Style
Result

class

Replaces the value with its entity label, e.g. <EMAIL>. Default.

class_numbered

Numbered labels, e.g. <email_1>. Identical values share a number.

empty

Drops the matched value.

masked

Replaces characters with *.

encrypted

AES-SIV, reversible. Always pass a key — it is not enforced server-side, and output produced without one cannot be decrypted.

tokenized

Format-preserving tokens for email, IPv4, IPv6, MAC, and phone. All other elements fall back to <CLASS>.


Response fields

Field
Type
Description

content

string

The file's text content with sensitive values redacted.

classifications

Classification[]

Detected matches that were redacted. Same shape as v1/classify.

scanner_version

string

Version of the scanner that produced the result.


Last updated

Was this helpful?