@premai/api-sdk package includes confidential-claude, a launcher that starts the Confidential Proxy in Anthropic mode and then runs the installed Claude Code CLI against it.
- Confidential API
- Router (Beta)
Use
confidential-claude to connect Claude Code through the local Confidential Proxy. Go to the confidential setup.How the launcher works
The launcher performs these steps on every run:- Requires an interactive terminal (TTY).
- Reads the endpoint, key, and KEK configuration.
- Starts or reuses the proxy on port
8787in Anthropic mode with attestation enabled. - Displays the list of your enabled models.
- Sets Claude Code’s Anthropic base URL and model environment variables.
- Forwards every remaining argument to the installed
claudecommand.
Before you start
You need:- Claude Code installed and available as
claudeonPATH. - A Prem API key.
- A 32-byte KEK encoded as 64 hexadecimal characters.
- A terminal with interactive input.
@premai/api-sdk.
1. Set the launcher values
confidential-claude reads API_KEY, not PREM_API_KEY. Supplying it through the environment also prevents the launcher from prompting for and saving the API key in its application-data .env file. The launcher still saves the selected model ID there.
2. Run the first request
Use--print for a bounded first test:
j and k, then press Enter.
--print still requires a TTY because the launcher always displays the model list before it starts Claude Code.3. Start an interactive session
Model selection
The picker calls the model-list endpoint on every run. This guide documents these chat models:
The Anthropic adapter returns the requested alias in its message
model field. It does not expose the backend-resolved model ID or an assurance profile. Do not infer an assurance class from the picker label. See Platform Status.
Stop the local proxy
The launcher starts a detached proxy and does not stop it when Claude Code exits. Stop it explicitly when you finish:8787 appears occupied:
Plaintext and tool boundary
Review Claude Code permissions, hooks, MCP servers, and egress separately. A confidential model route does not make local tool execution confidential.
Troubleshooting
TTY environment required
TTY environment required
Run the command directly in an interactive terminal. Piping input or starting it from a non-interactive CI process does not provide the interactive terminal that model selection needs.
install claude code
install claude code
Install Claude Code and confirm that
claude --version succeeds in the same shell.Failed to fetch models from proxy
Failed to fetch models from proxy
Check
API_KEY, PROXY_URL, ENCLAVE_URL, network access, and proxy logs. Confirm that the key can list models.Port 8787 is occupied
Port 8787 is occupied
Run
confidential-proxy status, then stop the managed proxy. The launcher refuses to take over an unknown process on that port.Attestation fails
Attestation fails
Do not add
--no-attest to work around the failure. Capture the error and verify the current Reticle boundary in Attestation.The selected model behaves differently from Claude
The selected model behaves differently from Claude
The wrapper supplies an Anthropic-compatible API shape. It does not turn a Prem model into an Anthropic-hosted Claude model.
Frequently asked questions
Does confidential-claude install Claude Code?
No. It checks for an existing claude command and exits if Claude Code is not installed.
Does it use my Anthropic API key?
No.API_KEY is the Prem API key. The launcher removes ANTHROPIC_API_KEY and passes the Prem key to Claude Code as the gateway authentication token.
Does it remember the model?
It writes the selected model to its application-data.env file, but the current launcher still shows the model list on each run.
Can I pass normal Claude Code arguments?
Yes. The launcher forwards its arguments toclaude, including --print.
Is the full coding session inside an enclave?
No. Only supported inference traffic uses the encrypted Prem path. Files and tools remain in their own local or external trust boundaries.Related
Anthropic-compatible clients
Review the Messages translation and compatibility limits.
Confidential Proxy
Review proxy modes, routes, keys, and daemon controls.
Platform Status
Review current behavior and assurance gaps.
Security Model
Review the protected and unprotected parts of the data flow.

