This feature is currently in beta. The API may change.
- A Datalab account with an API key (new accounts include $5 in free credits)
- Python 3.10+ installed
- The Datalab SDK:
pip install datalab-python-sdk - Your
DATALAB_API_KEYenvironment variable set
Submit a document
Send a multipart request toPOST https://www.datalab.to/api/v1/redact with your
X-API-Key header and either a file upload or a file_url.
Choose a starting point:
Review and edit the rules for your document; these starting points are not
compliance guarantees. For specific requirements, provide
redaction_spec as a
JSON object with a goal, rules and optional keep entries. Each rule has a
label and optional id and detail. Custom fields replace the corresponding
preset fields.
In the playground, Custom rules starts with empty Remove and Keep lists.
Add at least one Remove rule. Edits save automatically; replacing a customized
starting point or resetting rules asks before discarding edits. Visual and Raw
editing preserve the same rules.
Redaction reviews the whole document, up to 60 pages. PDF and image inputs are
supported. Page subsets are not supported.
Retrieve the result
Poll the returnedrequest_check_url until status is complete. The direct
response returns an available PDF as output_base64; regional requests may
provide a signed result_url for the result JSON instead.
The PDF is returned even when checks fail. Inspect verdict and failing_checks:
PASS means the checks passed; other verdicts mean the PDF needs review.
withheld is true only when no PDF
is available, rather than whenever a check fails.
The report provides targets_removed_count, targets_not_found_count,
redaction-box/page counts and check identifiers. It does not include removed
text, rule explanations or document-derived check details.
The playground labels outputs that did not pass verification Needs review
and allows you to preview and download them alongside the check results.
Pricing
On the current rate card, Redact starts at $10 per 1,000 pages. The run bills the greater of its page charge and compute charge (1.25× measured model cost), never their sum. Higher-cost runs therefore incur additional usage fees above the page price. Completed runs are charged even when verification fails. Existing contract and legacy-plan rates can differ; the playground displays your team’s quote. See pricing.Next Steps
Pipeline API
Run Redact as a standalone pipeline step.
Playground
Configure a preset or custom specification and inspect the result.