Skip to main content
Does your app already talk to the OpenAI API? Then you can point it at Prem instead. You change one setting: the base URL. Prem runs the model inside a secure enclave. Your prompts stay private on the way there. You connect through a small helper on your machine: the Confidential Proxy.
“OpenAI-compatible” describes the shape of the requests. It does not mean the requests go to OpenAI. It does not mean an OpenAI model runs behind them.
Use the local Confidential Proxy for sensitive model traffic. Go to the confidential setup.

Confidential API

What the proxy does

  • Accepts the client’s OpenAI-compatible request on your machine.
  • Encrypts request content before network egress.
  • Sends ciphertext and required metadata through the Prem API Gateway.
  • Decrypts the enclave response locally and returns the supported OpenAI-compatible response shape.

How the connection works

Your app and the Confidential Proxy stay on your machine. The Prem API Gateway sees only the sealed message. The Prem API Enclave opens it inside a Trusted Execution Environment (TEE).

What you can connect

You can connect any client that lets you set a custom base URL. For example:
  • OpenAI SDKs for Node.js, Python, and other languages.
  • Agent frameworks that support a custom OpenAI provider.
  • Internal apps that call /v1/chat/completions.
  • Audio apps that use the transcription or translation routes.
The proxy gives your app the routes below. It does not add every OpenAI feature. The client does not gain every OpenAI API feature. It gains the routes that the Confidential Proxy implements.

Supported routes

The inspected package implements these OpenAI-compatible routes: The current Deepgram transcription response is not normalized to OpenAI’s { "text": "..." } shape. It returns Deepgram-style metadata and results fields.
Do not expect the Responses, Assistants, Realtime, Batches, Embeddings, or Files APIs. Check the Prem API reference before you use another route.

Before you start

Get these four things ready:
  • An app that lets you set a custom OpenAI base URL.
  • A Prem API key. This proves who you are. See API Keys.
  • A client Key Encryption Key (KEK). This is a master key that protects your other keys.
  • A model that your Prem account can use. See Models & Pricing.
The API key and the KEK are two different secrets. The API key handles sign-in, limits, and billing. The KEK protects your encryption keys. Keep both safe.

1. Set your secrets

Open a terminal. Set these values in the terminal that runs the proxy:
Do you not have a KEK yet? Make one, one time only:
Store the KEK in a secret manager. Keep a backup. Use the same KEK every time. Do not make a new one each time you start the proxy.
PROXY_URL and ENCLAVE_URL show the current default endpoints. Check the Prem dashboard if the endpoints change.

2. Start the Confidential Proxy

Start the proxy in OpenAI mode. Keep this terminal open while you work:
The proxy now listens at http://127.0.0.1:8787/v1. Your app sends its requests there. Do you need one proxy for both OpenAI and Anthropic apps? Start it in both mode:
In both mode, the OpenAI base URL is http://127.0.0.1:8787/openai/v1.

3. Point your app at the proxy

List the models that your Prem API key can use:
Use the returned id value in later requests. Do not substitute an OpenAI model name unless Prem lists that exact ID. The model list currently does not include a provider-backed or Reticle-verifiable assurance label. Do not infer one from the alias. See Platform Status for the current contract gap.

4. Test chat completions

Send a small non-streaming request:
Replace glm-5.2 when your account uses another model. Inspect the response model field as well as the requested alias. A request for glm-5.2 currently returns the resolved ID zai-org/GLM-5.2. Do not continue if this request fails. See Errors and Rate limits.

5. Configure the application

Change only the API key and base URL when the application already uses Chat Completions.
Change glm-5.2 to a model your account can use. See your model IDs on the Prem dashboard. Other clients name the base URL setting in different ways. Look for baseURL, base_url, endpoint, host, or provider URL.

What this setup protects

This setup protects the model path only. It does not put your app, its tools, or its plugins inside the enclave.

Good to know

Use a Prem model ID. Compatibility does not give you OpenAI-hosted models. Use a model that /v1/models returns. One stream at a time. The encrypted endpoint allows one active stream for each API key. A second stream on the same key can return 429. Follow the Retry-After header when the response has one. See Agents & Automation. Check the finish reason. Read finish_reason on each response. Do not treat a cut-off reply as a complete one.

Troubleshooting

Check the base URL setting. Restart the app after you change it.
List your models with /v1/models. Use an enabled Prem model ID from that list.
Set the app to use Chat Completions. The proxy does not expose the Responses API.
Check finish_reason, timeout settings, proxy logs, and rate limits. Do not treat partial content as complete.
Wait for the active request to finish. Follow Retry-After when the response has it.

Frequently asked questions

Does “OpenAI-compatible” mean OpenAI processes the request?

No. The term describes the HTTP interface only. The request goes through Prem and uses the Prem model you choose.

Can I use an OpenAI model name?

Only when /v1/models returns that exact ID. Compatibility does not give you OpenAI-hosted models.

Can I use the Responses API?

No. Set the client to use /v1/chat/completions.

Which key goes in the Authorization header?

The Prem API key. The KEK is a separate local secret. Never send the KEK.

Does changing the base URL protect my local tools?

No. It protects the model path after the proxy seals the request. Your local tools keep their own trust boundaries.

Router

Beta
Router is not confidential. Do not send secrets, personal data, regulated data, or other sensitive data through this path.
An OpenAI-compatible Chat Completions client can call Router directly: Confirm that kimi-k3 appears in GET /v1/models for this key. Otherwise, use an exact returned model ID. See Router models.
Use a separate Router key and an exact ID returned for that key. See Router models.

Confidential Proxy

Review every mode, route, key, and daemon option.

OpenCode

Configure OpenCode as a specific OpenAI-compatible client.

OpenClaw

Configure a custom Chat Completions provider.

Hermes Agent

Use a named provider with the Chat Completions transport.

Goose

Point Goose’s built-in OpenAI provider at the proxy.

Anthropic-compatible clients

Use the Messages API shape through the same proxy.

Agents & Automation

Handle concurrency, retries, reasoning, and unattended operation.

Platform Status

Review current behavior and assurance gaps.