RedactAI

Integration Manual — v1.9

One baseURL change to scrub every outbound prompt.

helm install redactai oci://ghcr.io/redactai/proxy Interactive Filter Preview

01 / Guide

Point Any LLM SDK Through RedactAI

Keep your existing client library intact. Route outbound traffic through your in-VPC RedactAI endpoint and select a compliance policy header.

src/llm/client.ts
import OpenAI from "openai";

export const llm = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
  baseURL: "https://redact-proxy.internal.vpc/v1",
  defaultHeaders: {
    "X-Redact-Policy": "hipaa-strict",
    "X-Redact-Mode": "ephemeral-tokenize",
  },
});

02 / Guide

Declarative Policy Manifest

Commit entity rules alongside application code. Hot-reload rulesets across Kubernetes pods with zero dropped streams.

policies/hipaa-strict.yaml
policy: hipaa-strict
retention: zero
stream_rehydrate: true
entities:
  - type: US_SSN
    action: tokenize
    min_confidence: 0.85
  - type: EMAIL_ADDRESS
    action: tokenize
  - type: CREDIT_CARD
    action: block_request

03 / Guide

Inspect Zero-PII Audit Receipts

Every proxied inference emits a signed receipt header detailing scrubbed entity classes without ever logging plaintext.

response-headers.http
HTTP/2 200 OK
X-Redact-Receipt-Id: rct_01J9M4V7K2
X-Redact-Entities-Scrubbed: US_SSN=1,EMAIL_ADDRESS=1,CREDIT_CARD=1
X-Redact-Latency-Ms: 1.74
X-Redact-Persisted-Bytes: 0