N·01Integration guides
Codex
OpenAI's coding agent, used from the command line, the ChatGPT desktop app or an editor extension. All three share one config, so connecting XylemNode once covers them all.
If you'd rather not use a command line, use Codex in the ChatGPT desktop app (the former Codex desktop app now lives there) or the Codex extension for VS Code, Cursor and similar editors. It's all clicking and editing a text file, and once it's set up, the app, the extension and the CLI all use it.
Download the ChatGPT desktop app ↗
- 01
Install the desktop app or an editor extension
Either one works. Desktop app: download the ChatGPT desktop app with the button above (macOS and Windows); Codex is built in. Editor extension: in the Extensions panel of VS Code, Cursor or Windsurf, search for Codex and install the one published by OpenAI.
- 02
Open the config file
No need to hunt for the folder: in the desktop app, open Settings → Configuration → Open config.toml; in the extension, click the gear at the top right of the Codex panel → Codex Settings → Open config.toml. The file lives here; if you're told it doesn't exist, create a plain-text file with that name in that place.
- Windows
%USERPROFILE%\.codex\config.toml- macOS / Linux
~/.codex/config.toml
- 03
Paste the provider config
Paste the whole block into config.toml and save. If the file already has content, the first two lines must go at the very top, before any [bracketed] section; if it already has a model = or model_provider = line, change that line instead of adding a second one, and keep a single [model_providers.xylemnode] section. base_url must include /v1, wire_api stays responses, and the key doesn't go here: it gets its own file in the next step.
toml model = "gpt-6.1-sol" model_provider = "xylemnode" [model_providers.xylemnode] name = "XylemNode" base_url = "https://api.xylemnode.com/v1" wire_api = "responses" env_key = "XYLEMNODE_API_KEY" - 04
Add the key
In the same .codex folder as config.toml, create a file named .env containing the line below, and save it. The name before the equals sign must match env_key from the previous step and must not start with CODEX_, since names like that are ignored. In Windows Notepad, set "Save as type" to "All files" or it saves as .env.txt; in TextEdit on a Mac, choose Format → Make Plain Text first, and press Cmd + Shift + . in Finder to show hidden folders such as .codex.
.env XYLEMNODE_API_KEY=sk-your-key - 05
Restart and test
Quit the desktop app completely and reopen it; in an editor, press Ctrl / Cmd + Shift + P and run Developer: Reload Window. When you start a task, run it on your computer rather than in Cloud, then send a short message to confirm the connection. If gpt-6.1-sol doesn't appear in the model menu yet, that's fine: the model in config.toml is the one used.
- 01
Install and verify
Install globally with npm (be sure to include the @openai/ prefix; without it you get a different package named codex); on macOS you can also use Homebrew. After installing, print the version to confirm the command is ready.
terminal # npm (all platforms)
npm install -g @openai/codex# macOS Homebrew
brew install --cask codex# Verify
codex --version - 02
Find the config file
Codex reads .codex/config.toml in your user directory; create it by hand if it doesn't exist. To move it elsewhere, set the CODEX_HOME environment variable.
- Windows
%USERPROFILE%\.codex\config.toml- macOS
~/.codex/config.toml- Linux
~/.codex/config.toml
- 03
Write the provider config
Add XylemNode as a model source. Three things to note: you have to add /v1 to base_url yourself; Codex currently only speaks the Responses protocol, so keep wire_api set to responses; reference the key via env_key rather than writing it into config.toml. If the file already has a model = or model_provider = line, change that line instead of adding a second one.
toml model = "gpt-6.1-sol" model_provider = "xylemnode" [model_providers.xylemnode] name = "XylemNode" base_url = "https://api.xylemnode.com/v1" wire_api = "responses" env_key = "XYLEMNODE_API_KEY" - 04
Set the key
Store the key in the environment variable named by env_key above. On Windows, run setx and reopen the terminal for it to take effect; on macOS / Linux, export only lasts for the current terminal, so add the line to the end of ~/.zshrc (or ~/.bashrc) to keep it.
terminal # Windows (PowerShell / CMD)
setx XYLEMNODE_API_KEY "sk-your-key"# macOS / Linux
export XYLEMNODE_API_KEY="sk-your-key" - 05
Launch and test
Run codex (in a new terminal if you used setx) and send a simple prompt to confirm the connection. You can also pick a different model for one run.
terminal codex# Pick a model for this run
codex --model gpt-6.1-sol
Common questions
Every Codex command fails after an upgrade
Check wire_api in config.toml first. Codex has dropped chat/completions and speaks only the Responses protocol — the migration notice is explicit that any custom provider set to wire_api = "chat" has to be updated. Setting wire_api = "responses" explicitly on every model_providers entry is the safe choice. While you are there, confirm base_url carries /v1 by hand; Codex does not append it for you.