Skip to main content
Codex speaks the Responses protocol. Private AI Proxy configures it automatically.

With Private AI Proxy

  1. Install Private AI Proxy, choose a Phala profile, sign in, and turn on Protected.
  2. On the Agents screen, connect Codex and pick a model from the verified catalog.
  3. Start codex.
The app adds a custom model provider to ~/.codex/config.toml that points at its local API with an agent-scoped token, and restores the file when you disconnect or stop Protected. From the CLI, the same connection is:

Without the Proxy

Create a key under Private AI → API Keys in the Phala dashboard. Add Phala as a custom provider in the user-level configuration; Codex ignores model_provider and model_providers in a project-local .codex/config.toml.
~/.codex/config.toml
Pick the model from GET /v1/models; choose one that declares tools. This path does not verify attestation locally; use Private AI Proxy or the TypeScript ACI Verifier. Every model on this endpoint runs in a TEE.

Check the Connection

Start codex and run one bounded tool task. With the Proxy, the provider in config.toml points at http://127.0.0.1:4180/v1; without it, at https://inference.phala.com/v1.

Troubleshooting