AI Control Plane

Integrate in minutes

Add Treza’s redaction proxy to the OpenAI-compatible client you already use. Change one base URL, pass your proxy id, and PII is stripped from every prompt before it reaches the model.

  1. Step 01

    Create a redaction proxy

    In the Treza dashboard, create a proxy in front of your provider. Add your provider API key (stored encrypted), pick which PII types to strip, then generate a Treza API key with the redact:proxy scope.

  2. Step 02

    Point your client at Treza

    Set your OpenAI-compatible client's base URL to the Treza endpoint and pass your proxy id in the x-treza-proxy header. That's the only code change.

  3. Step 03

    Send a request

    Treza strips PII from the prompt, forwards the redacted request to your provider, and returns the response — with an audit record of exactly what was removed.

Drop it into your client

Same request shape as the OpenAI API. No SDK rewrite, no refactor.

Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    base_url="https://app.trezalabs.com/api/redact",
    api_key="YOUR_TREZA_API_KEY",
    default_headers={
        "x-treza-proxy": "YOUR_PROXY_ID",
    },
)

resp = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": (
        "Summarize this ticket: Customer Sarah Chen "
        "(sarah.chen@contoso.com, 212-555-0199) asked about refund AC-99821."
    )}],
)
print(resp.choices[0].message.content)
Node.js (OpenAI SDK)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://app.trezalabs.com/api/redact",
  apiKey: "YOUR_TREZA_API_KEY",
  defaultHeaders: { "x-treza-proxy": "YOUR_PROXY_ID" },
});

const resp = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Summarize this note for sarah.chen@contoso.com (212-555-0199)." }],
});
console.log(resp.choices[0].message.content);
curl
curl https://app.trezalabs.com/api/redact/chat/completions \
  -H "Authorization: Bearer YOUR_TREZA_API_KEY" \
  -H "x-treza-proxy: YOUR_PROXY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Draft a one-line reply to sarah.chen@contoso.com about order AC-99821"}]
  }'

Required headers

  • AuthorizationBearer YOUR_TREZA_API_KEY (with the redact:proxy scope)
  • x-treza-proxyYour proxy id, from Proxies → Integrate in the dashboard
  • Content-Typeapplication/json

What gets redacted

Choose which types each proxy strips. Out of the box, Treza detects:

  • Names
  • Emails
  • Phone numbers
  • Addresses
  • SSNs
  • Credit cards
  • Medical record numbers
  • Dates of birth
  • Account numbers
  • URLs
  • Dates
  • Secrets

Redaction modes

  • Pro — managed software redaction before your prompt reaches the provider. Responses include x-treza-mode: standard.
  • Enterprise — enhanced redaction engine inside a Treza Enclave with hardware attestation. Responses include x-treza-mode: tee.

Audit trail

Every proxied request returns an x-treza-request-id header and is recorded in your redaction audit log with entity counts and the redaction engine version. Export it any time for SOC 2, HIPAA, or your own records.

Stop leaking PII to your LLM

Create a proxy, copy the snippet, and start redacting. 14-day free trial, no sales call required.

Start free trial->