Redact
POST /v1/redact takes a file and returns a new file with the personal information gone. In a PDF the text is stripped out of the content stream, not covered with a rectangle — copy-paste and text search find nothing, because nothing is there. In audio the words are beeped or silenced and the transcript is rewritten.
How it works
- You send a file (a URL or a file id you already have) and, optionally, the
categoriesthat count as sensitive. - CloudRaker parses the document, locates every match, and rewrites the file destructively.
- Routing is by the input’s MIME type: audio and video go to audio redaction (
style), everything else to document redaction (mode). Sending the other medium’s parameter is a400. - The call holds until the run finishes — up to
?wait=seconds (60 by default, 120 max), then degrades to202with a run id instead of erroring. - The run, its input, and the redacted output expire on their own (
ttl, 24 hours by default) unless you keep them.
Redaction is destructive by design and the output is a new file — the original is left untouched. If you need the original gone, DELETE /v1/files/:id it, or let the run’s ttl purge both.
Quickstart
The sample uses a blank IRS Form W-9, so the call works with no local files.
The TypeScript and Python samples are plain HTTP so they run with nothing installed. This endpoint is also a top-level method on both SDKs as of 0.3.0 — client.redact(…); that page has a full worked example.
Example response
Key fields
The output file’s bytes are registered a moment after the run reports processed. In that window output.file can arrive without its url and the /output/ alias can answer 404 — re-fetch GET /v1/runs/:id and the URL will be there.
Configuration
Every field is optional except file.
Sending style on a PDF (or mode on audio) returns 400 invalid_request naming the parameter that doesn’t apply.
Sync vs async
Identical to extract: synchronous by default, ?wait= between 0 and 120 seconds, and a 202 handle instead of a timeout error at the cap.
Long recordings and large scans normally land here — pass ?wait=0 and poll, or use a webhook.
Save as an action
Redaction policy is usually organization-wide, not per call. Save the categories, instructions, and mode once and every call shrinks to {"file": …, "action": "hr-offboarding"}:
mimeType picks the variant (document or audio) at save time. See Saved actions.