Connect OpenAI to Treza

When you create a Treza redaction proxy with OpenAI as the upstream provider, you'll be asked for your OpenAI API key. Treza stores it encrypted and uses it server-side to forward your (redacted) requests to OpenAI — it's never exposed to your agents. Here's how to get one.

Create your OpenAI API key

  1. Go to the OpenAI API keys page: platform.openai.com/api-keys and sign in (or create an account).
  2. Click Create new secret key, give it a name like treza-proxy, and create it.
  3. Copy the key immediately — OpenAI only shows it once. It starts with sk-.
  4. Make sure your OpenAI account has billing set up with available credit, under Settings → Billing. Without it, requests fail with a quota error.

New to the OpenAI API? Their quickstart guide walks through your first request.

Add it to Treza

  1. In the Treza dashboard, open Redaction proxies and click New proxy.
  2. Leave Upstream provider set to OpenAI.
  3. Paste your sk-... key into the OpenAI API key field.
  4. Choose which PII types to redact, then create the proxy.

That's it. Point your existing OpenAI client at your Treza proxy's base URL and your requests will be redacted before they ever reach OpenAI.

Your provider key is encrypted at rest and only used to forward requests upstream. Treza never returns it to your agents or includes it in logs.