1. Install Codex
Open PowerShell on Windows or Terminal on Mac. Run only your system’s installer. Skip this if installed.- Windows PowerShell
- macOS / Linux / WSL
2. Save the address and model
Create a key, select its group in Model Square, and copy a Codex / Responses-compatible model name. Open the user configuration:- Windows PowerShell
- macOS / Linux / WSL
Ctrl + O, Enter, then exit with Ctrl + X. In Windows Notepad use Ctrl + S. Keep the filename config.toml, not .txt.
Paste into an empty file, replacing only YOUR_MODEL_ID:
model and model_provider at the top, then add or update [model_providers.nexusapi] without duplicate sections. You can use CC Switch instead. Do not put the key in this file.
3. Set and save your API key
Replace onlyYOUR_API_KEY with your complete key. The Windows commands set both the current terminal and persistent user environment.
- Windows PowerShell
- macOS (Zsh)
- Linux / WSL (Bash)
4. Start and test
Open a terminal in your own project and run:/status to check your model and the NexusAPI provider. Send “Reply only: connection successful. Do not modify files.” A complete reply and a record in Usage Logs confirm setup. The test uses a little credit.
5. Common problems
ForMissing environment variable, repeat step 3. For an unavailable model, recopy a Codex-compatible name from your group. See troubleshooting for other errors.
An editor launched from the Mac Dock may not inherit terminal variables. Verify the CLI first; for the Codex extension, launch the editor from the configured terminal with code . or cursor .. Keep keys out of project settings.
Official installation and configuration: Codex CLI · Custom providers.
Need a different model or group/key? If settings do not apply, use the symptom checklist.