Implementation Guide

    Redacting account and routing numbers from check images before they reach GPT-4o Vision

    Place a redaction step in the execution path so that only a masked image can reach the vision model. Detect the MICR line and the fractional routing number with layered methods, overwrite those pixels in the image buffer, re-encode a new file without metadata, and re-scan the output. If detection confidence is low or validation fails, block the image or escalate it for human approval. Retain a record of each decision.

    Mask irreversibly and verify the output

    1. Decode the image to a raw pixel buffer and normalize orientation and skew.
    2. Run each detector and take the union of the regions, with a margin around each box.
    3. Overwrite those pixels with a constant value in the buffer, not in a layer or annotation.
    4. Encode a new flat image file from the buffer. Do not copy the original's metadata, and strip or regenerate EXIF so no embedded fields, thumbnails or location data carry over.
    5. Re-scan the redacted file with OCR for residual digit sequences and checksum-valid routing numbers, and confirm the masked regions are uniform.
    6. Run extraction on a test set to confirm payee, amount, date and signature remain legible after masking.

    Retain evidence for every decision

    • Hash of the original image and of the redacted output
    • Detected regions as coordinates, with the method and confidence for each
    • Policy decision: allow, redact, block or escalate, and the rule that applied
    • Validation results, including the OCR re-scan outcome and metadata check
    • Approver identity and time for any escalated image
    • Detector and policy versions in force at the time

    Define the redaction scope first

    Sending a check image to an external model API moves its account and routing data outside the enterprise boundary. The first design decision is what counts as sensitive on the image, and it is wider than the bottom line.

    Under 12 CFR Part 229, the MICR line is the set of numbers that may include the routing number, account number, check number, amount and other information, printed near the bottom of the check in magnetic ink. The paying bank is also identified by a fractional form of the routing number, generally in the upper right-hand corner. A policy that masks only the bottom strip leaves a routing number visible. The on-us field of the MICR line holds the account number plus other institution-specified codes, and some checks also carry an external processing code, so treat the whole line as one deny region.

    Then define what the model needs. For most extraction and classification tasks that is the payee, amount, date and signature. Use an allowlist of those fields and deny the MICR line and fractional routing number by default. Because the MICR line can also encode the amount, confirm that your amount extraction reads the written or courtesy amount and not the MICR strip.

    As of November 2026, 12 CFR Part 229 defines these elements but does not itself impose a redaction duty. FTC Safeguards Rule and Gramm-Leach-Bliley materials treat account numbers as nonpublic personal information, which is the reason to handle them as sensitive. Counsel should confirm how those rules apply to your use of an external model API.

    Choose detection methods and plan for their failure modes

    No single detector is reliable across varied layouts, scan quality and skew, so use more than one and mask the union of what they find. Measure miss rates on your own scans, including skewed, low-resolution and non-standard layouts, before relying on any method.

    • MICR-region localization: Finds the bottom band where the MICR line is printed and masks it. Fast and a sensible first layer. Fails when the check is cropped, rotated or laid out unusually, so deskew first and treat a missing or implausible band as a failure, not as nothing to redact.
    • Fixed-region templates: Extracts field subimages at known positions after registering the image to a template. Works for known check designs. Skew or misalignment puts registration at risk, and unfamiliar layouts have no template.
    • OCR with pattern validation: Reads text, then flags nine-digit sequences that pass a routing number check-digit test and long digit runs likely to be account numbers. Catches repeated instances, such as the fractional routing number, but misreads degrade at low resolution and magnetic-ink fonts can be OCR-hostile.
    • Layout or object-detection models: Learn to find MICR and routing regions on varied layouts. Handle non-standard checks better, but need representative training and test data and return confidence scores you must threshold.

    Fail closed when confidence is low

    Redaction that quietly passes an image through when detection is uncertain is worse than no control, because it creates false assurance. Define the failure conditions in advance: the MICR line is not found, detector confidence falls below your threshold, detectors disagree, or the post-redaction scan finds any residual routing-number pattern or long digit run in a region you expected to be masked.

    For each condition, choose block or escalate for human approval. Blocking suits automated batch flows. Escalation suits cases where an operator can review and approve. Reviewers then see sensitive material, so restrict their access and record who approved what.

    The tradeoff is throughput. A conservative threshold sends more images to review, and a loose one raises the chance of a leak. Set the threshold from measured miss rates on your own check population, and revisit it as scan sources change.

    Enforce the step in the execution path

    A preprocessing script that teams are expected to call is advisory. Any code path that calls the model API directly bypasses it. The control needs to sit where the request is made, so that the only route to the model carries the redacted image and a recorded decision.

    That means the call is refused unless the image has passed redaction and validation, and an unredacted check image has no path to the API. Policy is enforced at runtime, not reviewed after the fact. Trussed enforces policy in the execution path to allow, redact or block image inputs, and to escalate for human approval where policy requires it. It generates audit-ready evidence from that enforcement, and it can be self-managed in the customer cloud with configurable retention and data residency.

    Whichever mechanism you use, keep detection logic versioned alongside the policy, so a change to a threshold or detector is itself a recorded change.

    Pre-inference redaction path for check images

    Detect

    Locate the MICR line and the fractional routing number using layered methods.

    Mask

    Overwrite pixels in the buffer and encode a new, metadata-free file.

    Validate

    Re-scan the output for residual digits and routing number patterns.

    Decide

    Allow, redact, block or escalate before any call to the model API.

    Record

    Store hashes, regions, confidence, validation results and approvals.

    Put redaction in the path, with evidence

    See how policy enforcement in the execution path allows, redacts or blocks image inputs and produces audit-ready evidence for each decision.

    Request a Demo
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.