config.toml file and an API key in its auth.json file.
Install Codex CLI
macOS and Linux
~/.codex/config.toml~/.codex/auth.json
Windows PowerShell
%USERPROFILE%\.codex\config.toml%USERPROFILE%\.codex\auth.json
config.toml
auth.json
What to verify
model_providermatches the provider block name exactly asappleaibase_urlpoints tohttp://160.187.0.165:8138/v1OPENAI_API_KEYin yourauth.jsonfile contains the correct API key- Use normal ASCII quotes in TOML, not smart quotes
Launch
config.toml file and the API key in your auth.json file.