Codex App (Desktop)
Configure the LMU AI API base URL and key in the Codex App desktop client — works on both Windows and Mac.
If you don't want to install the Codex CLI and just want to use the Codex App desktop client, follow this method.
Note
- If you've previously signed in with your own account, first sign out of the current account in the Codex App, then reconfigure.
- After you switch the API, your chat history will be gone (account-type chat history is stored in your GPT account's space, not locally).
- After you switch to the API login, all chat history from then on is saved locally and won't be lost!
Step 1 — Create the config files
Config file location:
- Mac/Linux: the
.codexfolder in your home directory (~) - Windows:
C:\users\your-username\.codex\
If the folder already exists, it's best to delete the auth.json and config.toml inside it and recreate them, to avoid interference from old config.
Create the folder with a terminal command:
# Mac/Linux
rm -rf ~/.codex && mkdir ~/.codexCreate two files in the .codex folder:
auth.json
Holds your API key:
{
"OPENAI_API_KEY": "your sk- key generated in the console"
}config.toml
Configure the service provider:
model = "gpt-5.4"
model_reasoning_effort = "xhigh"
disable_response_storage = true
sandbox_mode = "danger-full-access"
windows_wsl_setup_acknowledged = true
approval_policy = "never"
file_opener = "vscode"
model_provider = "codex"
web_search = "cached"
suppress_unstable_features_warning = true
[history]
persistence = "save-all"
[tui]
notifications = true
[shell_environment_policy]
inherit = "all"
ignore_default_excludes = false
[sandbox_workspace_write]
network_access = true
[features]
plan_tool = true
apply_patch_freeform = true
view_image_tool = true
unified_exec = false
streamable_shell = false
rmcp_client = true
elevated_windows_sandbox = true
[profiles.auto-max]
approval_policy = "never"
sandbox_mode = "workspace-write"
[profiles.review]
approval_policy = "on-request"
sandbox_mode = "workspace-write"
[notice]
hide_gpt5_1_migration_prompt = true
[model_providers.codex]
name = "codex"
base_url = "https://api.lmuai.com"
wire_api = "responses"
requires_openai_auth = trueIt's usually inside the .codex folder in your home directory. If you can't find the .codex folder there, you can create the folder manually, along with config.toml and auth.json.
The config file contents are identical to the Codex CLI Mac/Linux setup guide — you can follow that guide to create them in the terminal, and they take effect after restarting the Codex App just the same.
Step 2 — Reopen the Codex App
After saving the config files, reopen the Codex App and it will sign in and be ready to use automatically.
Enabling the 1M context (optional)
gpt-5.4 supports a 1M-token long context, but it's off by default. Add two lines at the top level of the config.toml above (before any [section]), then restart the Codex App:
model_context_window = 1000000
model_auto_compact_token_limit = 900000For field meanings, how to verify, and caveats, see Enabling the 1M context in Codex.
Common errors
Error 401, incorrect key:
Cause: the request is still going to OpenAI's official endpoint rather than our API relay, or you didn't restart the tool to reload the config file.
Fix: follow the guide again to create or replace the config.toml and auth.json files, then reopen the app.
Last updated:
Get an LMU AI key and start using Claude, Codex and more
Free sign-up, flexible plans, one key across Claude Code, Codex CLI, Cursor, VS Code, OpenCode, Cherry Studio and other AI tools.
Sign upCodex CLI (Server)
Deploy the Codex CLI on a WSL2 or SSH server and connect to the LMU AI API: install Node 20 with volta, then write config.toml and auth.json in one command.
CC Switch one-click import
Use the CC Switch desktop tool to import your LMU AI API config into Claude Code in one click, skipping the manual settings.json edit.