Codex Setup Guide
This guide shows how to install OpenAI Codex on macOS and Windows, then connect it to Let AI Run.
1. Prepare Your API Key
Prepare a valid Let AI Run key first (typically starts with sk-). You will place it in auth.json.
2. Install on macOS
- Codex APP
Official website download:https://chatgpt.com/codex
- Codex Cli
brew install codex
If Node.js is already installed, you can also install with npm:
npm install -g @openai/codex
3. Configure on macOS
Create the hidden config directory first:
mkdir -p ~/.codex
Create ~/.codex/config.toml with:
model_provider = "letairun"
model = "gpt-5.5"
model_reasoning_effort = "xhigh"
disable_response_storage = true
network_access = "enabled"
model_verbosity = "high"
[model_providers.letairun]
name = "letairun"
base_url = "https://api.letai.run/v1"
wire_api = "responses"
requires_openai_auth = true
[features]
fast_mode = false
prevent_idle_sleep = true
streamable_shell = false
Create ~/.codex/auth.json:
{
"OPENAI_API_KEY": "your-api-key-here"
}
Replace your-api-key-here with your real API key.
4. Install on Windows
- Codex APP
Official website download:https://chatgpt.com/codex
- Codex Cli
- Install Node.js:
https://nodejs.org/zh-cn/download/current - Install Codex:
npm install -g @openai/codex
5. Configure on Windows
Create this folder (note the leading .):
%USERPROFILE%\\.codex\\
Create %USERPROFILE%\\.codex\\config.toml:
model_provider = "letairun"
model = "gpt-5.5"
model_reasoning_effort = "xhigh"
disable_response_storage = true
network_access = "enabled"
windows_wsl_setup_acknowledged = true
model_verbosity = "high"
[model_providers.letairun]
name = "letairun"
base_url = "https://api.letai.run/v1"
wire_api = "responses"
requires_openai_auth = true
[features]
fast_mode = false
prevent_idle_sleep = true
streamable_shell = false
Create %USERPROFILE%\\.codex\\auth.json:
{
"OPENAI_API_KEY": "your-api-key-here"
}
6. How To Start
- Terminal: run
codex - VSCode / Cursor: install the official OpenAI
Codexextension
7. Troubleshooting
codexcommand not found:- Confirm installation completed successfully.
- If installed via npm, make sure the global npm bin path is in
PATH.
- Authentication failed:
- Check
auth.jsonfile name and location. - Make sure
OPENAI_API_KEYis your real key, not the placeholder.
- Check
- Requests are not routed to Let AI Run:
- Verify
base_urlishttps://api.letai.run/v1inconfig.toml.
- Verify