Quickstart
Send your first PII-redacted LLM request through the Treza AI Control Plane. You'll create an API key, configure a proxy, point your OpenAI client at Treza, and check the audit log.
Prerequisites
A Treza account β sign in at trezalabs.com (email sign-in; the Starter plan is free)
An API key from your LLM provider (e.g. an OpenAI
sk-...key)
1. Create a Treza API key
In the dashboard, go to API Keys and create a key with the redact:proxy scope. Add redact:run and redact:log if you also want the standalone redaction and log endpoints.
The key (treza_live_...) is shown once at creation. Store it in a secrets manager β you'll send it as the Authorization: Bearer header on every request.
2. Create a proxy
Go to Control Plane in the dashboard and create a proxy:
Choose the upstream provider (OpenAI on Starter; Azure OpenAI, Anthropic, or a custom endpoint on Pro+).
Paste your upstream provider key. It is envelope-encrypted with KMS at rest, never returned by any API, and used server-side β so your application never needs to handle the provider key again.
Copy the proxy id (
proxy_...).
Don't want Treza to store your provider key? Leave it off the proxy and pass it per-request in the x-model-key header instead.
3. Point your client at Treza
The proxy endpoint is OpenAI-compatible, so existing SDKs work with a base-URL change.
curl
The upstream provider receives the redacted prompt:
TypeScript (OpenAI SDK)
Python (OpenAI SDK)
Streaming is supported. Set stream: true and the proxy forwards the upstream provider's Server-Sent Events stream straight through, so token-by-token output works with the standard OpenAI SDKs. Treza never rewrites the response body β placeholders are rehydrated client-side from the x-treza-rehydration map, which is sent as a response header before the first token. Because a placeholder can be split across SSE chunks, rehydrate against the accumulated text rather than individual deltas.
4. Inspect the response
Every proxied response carries Treza headers:
x-treza-request-id
Unique id for this redaction request (matches the audit log)
x-treza-mode
standard (managed software redaction) or tee (Enterprise enclave)
x-treza-rehydration
Placeholder β original map (only when requested, see below)
If the model's reply references placeholders, request the rehydration map and restore values client-side:
5. Try redaction without forwarding
To see what the pipeline detects β without calling any upstream and without using your request quota β use POST /api/redact/run (requires the redact:run scope):
6. View the audit log
Each request (proxied or standalone) writes an audit entry scoped to the API key that made it. Fetch entries with the redact:log scope:
Query parameters: limit (1β500, default 20) and since (ISO timestamp). Audit entries contain entity counts by type β never the redacted values themselves. Request counts and entities-redacted insights are also available in the dashboard under Usage & insights.
Next steps
Proxies & Policies β multiple providers, pausing proxies, custom policies
Usage & Billing β usage insights, audit export, and how requests are counted
Plans & Pricing β included volumes and what happens when you hit your limit
Attestation β prove redaction ran inside a Treza Enclave (Enterprise)
Last updated