- Confidential API
- Router (Beta)
Use the local Confidential Proxy for sensitive model traffic. Go to the confidential setup.
Confidential API
How the connection works
Before you start
You need:- OpenClaw installed. See the OpenClaw setup guide.
- A Prem API key. See API Keys.
- A 32-byte client KEK encoded as 64 hexadecimal characters.
- The current Prem gateway and enclave endpoints.
- A chat model returned by your Prem model-list request.
2026.7.1-2 using a normal agent turn and a local file-reading tool call.
1. Set your secrets
openclaw.json as a literal value.
2. Start the Confidential Proxy
3. Select an enabled model
id returned by this request. The example below uses qwen36-27b.
Test it before starting OpenClaw:
4. Configure OpenClaw
OpenClaw reads JSON5 from~/.openclaw/openclaw.json. Add a custom provider:
api: "openai-completions". The Confidential Proxy does not expose /v1/responses.
OpenClaw allows the exact baseUrl origin in its guarded model-request path. See the OpenClaw custom-provider reference.
Validate the file:
5. Run one agent turn
Run a bounded local turn before connecting channels or schedules:prem-confidential and the model you configured.
OpenClaw can stream model output through the Chat Completions connection. Tool calls return through the encrypted model channel, but OpenClaw executes each tool in its local environment.
Tool and channel boundary
Review channel allowlists, tool permissions, secret storage, workspace access, and external egress separately.
Agent limits
The encrypted chat endpoint permits one active stream for each API key. Parallel OpenClaw agents using the same key can receive429 responses.
Start with one worker. Serialize model turns or assign a separate Prem API key to each concurrent worker. Review Agents & Automation before enabling unattended schedules or channels.
Troubleshooting
OpenClaw rejects the configuration
OpenClaw rejects the configuration
Run
openclaw config validate. Check the field names and confirm that api is openai-completions.OpenClaw calls /v1/responses
OpenClaw calls /v1/responses
The provider is using the wrong adapter. Set
api to openai-completions and restart the affected agent process.The provider cannot reach 127.0.0.1:8787
The provider cannot reach 127.0.0.1:8787
Confirm that the Confidential Proxy is running in the same host environment. A container or remote OpenClaw worker needs a reachable proxy address instead of its own loopback interface.
The API returns model not found
The API returns model not found
Call
/v1/models with the Prem API key and use a returned model ID in both provider locations.The API returns 429
The API returns 429
Wait for the current stream to finish. Reduce parallel agent turns or use separate API keys for concurrent workers.
Frequently asked questions
Is OpenClaw running inside the enclave?
No. OpenClaw runs on your machine. Only supported model inference traffic passes through the encrypted Prem path.Does OpenClaw need the Prem TypeScript SDK?
No. It calls the OpenAI-compatible surface exposed by the local proxy.Can OpenClaw use tools through this setup?
Yes, when the selected model produces compatible tool calls. OpenClaw executes those tools outside the enclave.Can I expose the proxy to a remote OpenClaw host?
Yes, but that changes the local trust boundary. Use TLS, authenticated private networking, a restrictive firewall, and a controlled host binding. Do not expose an unauthenticated plaintext listener to the public internet.Router
Beta OpenClaw uses Router through a separateopenai-completions provider.
kimi-k3 appears in GET /v1/models for this key. Otherwise, use
an exact returned model ID. See Router models.
Add a provider named prem-router with these values:
Use the complete JSON in the Router OpenClaw configuration, then run
openclaw config validate. Do not start the Confidential Proxy or pass a KEK for this provider.
Related
Confidential Proxy
Review modes, routes, keys, and daemon controls.
OpenAI-compatible clients
Understand the interface used by OpenClaw.
Agents & Automation
Review concurrency, retries, and unattended operation.
Security Model
Review the protected and unprotected parts of the flow.

