Codex
Install Codex and connect it to SoleAPI permanently through its configuration file.
Codex
This guide connects Codex to SoleAPI permanently through its config.toml configuration file. If you prefer a graphical setup, you can use the more convenient CC Switch. Before you begin, create an API Key in the console.
Install Codex
Install the command-line version (CLI)
This section installs codex-cli through npm, which is included with Node.js.
- Make sure your Node.js version is at least v22. Check it by running:
node -v
If your version is below v22 or Node.js is not installed, get it from the Node.js download page.

- Install
@openai/codexwith npm
npm install -g @openai/codex
Install the Windows graphical version (ChatGPT)
Codex is now integrated into the ChatGPT application. Switch to Codex from the upper-left corner of the ChatGPT app:

- Option 1: install ChatGPT from the Microsoft Store.

- Option 2: download the installer from the official download page.

Connect Codex to SoleAPI
- Open the Codex configuration directory
- Windows:
C:\Users\your-username\.codex - macOS:
/Users/your-username/.codex - Linux:
/home/your-username/.codex
On Windows, press Win + R, enter explorer %userprofile%\.codex, and press Enter to open the directory in File Explorer.


On Linux / macOS, run cd ~/.codex in a terminal to enter the directory.
- Confirm that the configuration file exists
The required file is config.toml. Create it if it does not exist. If it already exists, make a backup first.
- Edit the configuration file
Merge the following into config.toml. Replace sk-sole-your-key with your own API Key and set model to the model ID you want to use:
model_provider = "soleapi"
model = "gpt-5.6-sol"
[model_providers.soleapi]
name = "SoleAPI"
base_url = "https://soleapi.com/v1"
experimental_bearer_token = "sk-sole-your-key"
wire_api = "responses"base_url must be https://soleapi.com/v1 without a trailing /.
If config.toml already contains other settings, keep them and merge or update only model_provider, model, and [model_providers.soleapi]. Back up the file before editing it.
- Verify the configuration
Save the file, completely quit Codex, and restart it. Send a message; a normal reply confirms that the configuration works.
The ChatGPT application normally minimizes to the system tray when its window is closed. Right-click the tray icon and select Quit before restarting the application so the configuration takes effect.

Frequently asked questions
- The request returns 404: confirm that
base_urlishttps://soleapi.com/v1. - The request path contains double slashes: remove the trailing
/frombase_url. - The server returns 401: check that
experimental_bearer_tokenis complete and that the API Key is still valid.