Video Piper APIv1 Home OpenAPI spec

Docs › Redaction

Redaction fields

Blur or black out regions of a video, each during a time window, or let auto-redaction find secrets, emails and card numbers on screen for you. Redactions go in the redactions option of complete; see Processing options for the request body.

FieldDescription
type"box" (solid black bar: irreversible, the safest choice for text) or "blur".
shape"rect" (default) or "ellipse" (fills the box).
x, y, w, hTop-left corner and size, as fractions of the final frame (0–1). For screen + camera videos that's the combined picture.
start, endSeconds on the output timeline (after any trim). end: null = until the end.

Auto-redaction (Pro and Scale)

Add "autoRedact": true to complete, an import, an edit or a reprocess, and before encoding we look at the screen five times a second, read it right after each change, and blur what shouldn't be seen, wherever and whenever it appears: API keys and tokens (AWS, Stripe, GitHub, Slack, Google, OpenAI and more, JWTs, private keys, long random strings), email addresses and card numbers. Choose what to look for and how to hide it:

POST /videos/3f1c…/complete
{ "autoRedact": { "types": ["secrets", "emails", "cards", "faces"], "style": "box" } }

GET /videos/3f1c… (once ready)
"autoRedaction": { "types": ["secrets", "emails", "cards", "faces"], "style": "box", "found": 2,
  "regions": [ { "kind": "secret", "start": 12.5, "end": 31, "x": 0.21, "y": 0.4, "w": 0.32, "h": 0.03 }, … ] }
  • Types: secrets, emails, cards (on with true) and faces (faces shown on screen, e.g. a video call; never your camera overlay; off unless listed). Style: blur (default) or box.
  • Each thing found becomes a redaction for the time it's on screen, following it if it moves (text scrolled across the screen stays covered from the moment it comes into view), added after your own redactions within the same limit of 20 (when there are more, nearby ones are merged, so more may be hidden, never less).
  • The text that was read is never stored or returned: status shows only the kind, time and place of each region and, for a key in a format it knows, that format and its last four characters (Keys to rotate).
  • If detection can't run, the video fails instead of being published unredacted. It adds roughly 20–40% to processing time for videos that use it.
  • Upload tokens can set it ("autoRedact": true in POST /upload-tokens), so recordings from <video-piper-recorder> are always checked. To turn it off for a video, reprocess without it.
  • It reads text and faces, so it can miss tiny or blurry text and can't see inside password fields. For anything critical, review and redact as well.
  • Keys to rotate: hiding a key protects the people who watch the video, but the key was on screen while it was recorded and is still in the original, so it should be replaced where it was issued. When it looks for secrets, status lists each key in a format it knows under autoRedaction.secrets (review.secrets on a review run), and the video.secrets_found webhook sends the same list as soon as the video is published or a review is waiting:
    GET /videos/3f1c… (once ready)
    "autoRedaction": { "types": ["secrets", "emails", "cards"], "style": "blur", "found": 2, "regions": [ … ],
      "secrets": [ { "type": "stripe_live_secret_key", "name": "Stripe live secret key",
                     "lastFour": "x7Qd", "start": 12.4, "end": 31.1, "appearances": 1 } ] }
    type and name are the format, lastFour its last four characters, start and end the seconds of the video between which it is hidden (end is null when that is to the end) and appearances how many separate times it was on screen. The key itself is never stored or sent. secrets is [] when it looked and recognised none, and absent when it didn't look for secrets. At most 50 are listed.
    typenameLooks like
    aws_access_key_id, aws_temporary_access_key_idAWS access key ID, AWS temporary access key IDAKIA…, ASIA…
    stripe_live_secret_key, stripe_test_secret_key, stripe_live_restricted_key, stripe_test_restricted_keyStripe live / test secret key, Stripe live / test restricted keysk_live_…, sk_test_…, rk_live_…, rk_test_…
    webhook_signing_secretWebhook signing secretwhsec_… (Stripe's, ours and other Standard Webhooks secrets)
    github_tokenGitHub tokenghp_…, gho_…, ghu_…, ghs_…, ghr_…, github_pat_…
    slack_tokenSlack tokenxoxb-…, xoxp-… and the other xox kinds
    google_api_keyGoogle API keyAIza…
    anthropic_api_keyAnthropic API keysk-ant-…
    openai_api_keyOpenAI API keysk-proj-…, sk-svcacct-…, sk-admin-…
    sk_api_keyAPI key starting sk- (OpenAI and others)other keys starting sk-: OpenAI's older keys and other providers'
    video_piper_api_key, video_piper_test_api_key, video_piper_tokenVideo Piper API key, test API key, tokenvpk_…, vp_test_…, and session, upload, edit and thumbnail tokens
    jwtJSON Web TokeneyJ….eyJ….…; lastFour is null when its signature wasn't read (it often wraps to the next line)
    private_keyPrivate keya -----BEGIN … PRIVATE KEY----- header; lastFour is null
    Only these are listed. Long random-looking strings without a known format are hidden but not listed (most are hashes and IDs), and neither are email addresses, card numbers, faces or publishable keys (pk_…, public by design). The last four characters are as read from the screen: text recognition can get one wrong (a 0 read as an O, a 5 as an S), and a key cut off by the edge of a window ends where it was cut. Use them with the format and the time to find the key, not as proof; and it can miss a key altogether, like anything else it looks for.
  • Review first: add "review": true and it only looks. Nothing is hidden, encoded, published or metered; the video stops as NEEDS_REVIEW, and its status carries review: each proposed region with its kind, time window, place and a frameUrl (a JPEG of the frame it was found in; the region is a fraction of that picture), the keys it recognised (secrets), the request's own redactions (not applied either), and a previewUrl for the upload itself. Confirm with POST /videos/{id}/reprocess, sending the proposals you accept as redactions exactly as they came (plus your own again, and deleteOriginal if wanted): a new video is made from the same upload with exactly those regions, and the review video can then be deleted. In the app, Auto-redact → Review first shows the findings with their pictures to tick, adjust in the editor and confirm. The video.needs_review webhook says when a review is waiting.
    POST /videos/3f1c…/complete
    { "autoRedact": { "review": true } }
    
    GET /videos/3f1c… (once it has looked)
    { "status": "NEEDS_REVIEW",
      "review": { "types": ["secrets", "emails", "cards"], "style": "blur", "found": 1, "redactions": [],
        "proposed": [ { "kind": "secret", "type": "blur", "shape": "rect", "start": 12.5, "end": 31, "x": 0.21, "y": 0.4, "w": 0.32, "h": 0.03, "frameUrl": "https://…" } ],
        "previewUrl": "https://…", "linksExpireInSeconds": 900 } }
    
    POST /videos/3f1c…/reprocess   (confirm: the regions you accept)
    { "redactions": [ { "kind": "secret", "type": "blur", "shape": "rect", "start": 12.5, "end": 31, "x": 0.21, "y": 0.4, "w": 0.32, "h": 0.03 } ], "deleteOriginal": true }

Following moving content

For something that moves, like a face walking across the frame, give the region a track of keyframes instead of x, y, w, h. It glides smoothly between them, resizing as it goes:

{ "type": "blur", "shape": "ellipse", "start": 4, "end": 12,
  "track": [ { "time": 4,  "x": 0.10, "y": 0.30, "w": 0.15, "h": 0.25 },
             { "time": 8,  "x": 0.45, "y": 0.28, "w": 0.18, "h": 0.30 },
             { "time": 12, "x": 0.80, "y": 0.30, "w": 0.15, "h": 0.25 } ] }

Add a keyframe wherever the motion changes direction or speed. Up to 50 keyframes per region.