Redact
POST /v1/redact takes a file. It returns a new file without the personal information. In a PDF, CloudRaker strips the text out of the content stream. It does not cover the text with a rectangle. Copy-paste and text search find nothing, because the text is gone. In audio, CloudRaker beeps or silences the words and rewrites the transcript.
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 follows the input’s MIME type. Audio and video go to audio redaction (
style). All other files go to document redaction (mode). If you send the parameter for the other medium, the API returns a400. - The call holds until the run finishes, up to
?wait=seconds (default 60, max 120). At the cap, the call returns202with a run id instead of an error. - The run, its input, and the redacted output expire after the
ttl(default 24 hours). To retain them, keep them.
Redaction is destructive by design. The output is a new file. The original stays untouched. To remove the original, call DELETE /v1/files/:id, or let the run’s ttl purge both files.
Quickstart
The sample uses a blank IRS Form W-9, so the call works with no local files.
The TypeScript and Python samples use plain HTTP, so they run with no installed packages. 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
CloudRaker registers the output file’s bytes 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 to get the URL.
Configuration
Every field is optional except file.
If you send style on a PDF, or mode on audio, the API returns 400 invalid_request. The error names the parameter that does not apply.
Sync vs async
The behavior matches extract. Calls are synchronous by default. ?wait= accepts 0 to 120 seconds. At the cap, the API returns a 202 handle instead of a timeout error.
Long recordings and large scans normally land here. Pass ?wait=0 and poll, or use a webhook.
Save it as a config
Redaction policy is usually organization-wide, not per call. Save the categories, instructions, and mode once in the redact config library. Then every call shrinks to {"file": …, "action": "hr-offboarding"}:
mimeType picks the variant (document or audio) at save time. Only this library accepts it. GET, PATCH and DELETE /v1/redact/configs/{idOrSlug} do the rest. The flat /v1/actions routes remain as a deprecated alias. See Saved configs.