Skip to main content
Codex CLI needs both a custom provider in its config.toml file and an API key in its auth.json file.

Install Codex CLI

macOS and Linux

Use:
  • ~/.codex/config.toml
  • ~/.codex/auth.json

Windows PowerShell

Use:
  • %USERPROFILE%\.codex\config.toml
  • %USERPROFILE%\.codex\auth.json

config.toml

auth.json

What to verify

  1. model_provider matches the provider block name exactly as appleai
  2. base_url points to http://160.187.0.165:8138/v1
  3. OPENAI_API_KEY in your auth.json file contains the correct API key
  4. Use normal ASCII quotes in TOML, not smart quotes

Launch

If Codex CLI starts but fails to answer, recheck both the provider settings in your config.toml file and the API key in your auth.json file.