Client setup

Codex Setup Guide

Connect Codex CLI and the desktop app to ZhenAPI using setup scripts or manual configuration, including API keys, models and the Responses API.

Install and configure Codex to connect to ZhenAPI through ~/.codex.

Choose the setup script for your operating system

The script detects Node.js and Codex CLI and helps install them if necessary. It then asks for your API key and writes the configuration to ~/.codex. The copied command does not contain your API key.

POWERSHELL
1irm https://zhenapi.ai/install/codex.ps1 | iex

After running the command, wait for PowerShell to prompt for your API key. Right-click to paste the full key, then press Enter. Do not use Ctrl+V or other paste shortcuts.

💡 The configuration in ~/.codex is used by both Codex CLI and Codex App. Restart any open CLI sessions to load the new settings.