System Framework v4.7.0 // BRUCEAI API Gateway
+ 01
+ 02

BRUCEAI

ISOLATED_CODEX_HOME

Codex setup

To avoid touching your existing Codex or ChatGPT login, put the BRUCEAI test config in a separate folder and isolate it with CODEX_HOME.

This keeps your personal ~/.codex unchanged. Testing BRUCEAI will not affect your normal codex command.

Supported model IDs

Copy these model IDs into config files, API request bodies, or any OpenAI-compatible client that asks for a model name.

STEP 01 / API_KEY_REQUIRED

Prepare your API key

1. Go to the API key page

After signing in, open the API key page to create or copy an API key. It looks like sk-or-v1-xxxxxxxxxxxx. Treat it like a password.

Create API key
2. Confirm Base URL
https://api.bruceai.net/v1

Codex uses the OpenAI-compatible interface, so this Base URL must include /v1.

Do not share your API key with anyone, and do not commit it to GitHub, GitLab, or any public repository.

Choose your system first

The commands below will switch to the system you choose.

STEP 02

Install Codex CLI

Run this only if Codex CLI is not installed yet.

macOS / Linux
bash
npm install -g @openai/codex
STEP 03

Create an isolated config folder

macOS / Linux
bash
mkdir -p ~/.codex-bruceai
STEP 04

Write config.toml

Open config.toml with the command below. If the file does not exist, the editor will create it.

macOS / Linux
bash
nano ~/.codex-bruceai/config.toml
STEP 05

Paste config.toml contents

Paste the full content below into config.toml. In nano on macOS / Linux: press Ctrl+O, press Enter to save, then press Ctrl+X to exit. In Windows Notepad, press Ctrl+S and close the window.

toml
model_provider = "OpenAI"
model = "gpt-5.6-terra"
model_reasoning_effort = "high"
disable_response_storage = true

[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://api.bruceai.net/v1"
wire_api = "responses"
requires_openai_auth = true
STEP 06

Create auth.json

Open auth.json with the command below, then prepare to paste your BRUCEAI API key.

macOS / Linux
bash
nano ~/.codex-bruceai/auth.json
STEP 07

Paste auth.json contents

Replace sk-or-v1-your-key with the key you created on the API key page. In nano on macOS / Linux: press Ctrl+O, press Enter to save, then press Ctrl+X to exit. In Windows Notepad, press Ctrl+S and close the window.

json
{ "OPENAI_API_KEY": "sk-or-v1-your-key" }
STEP 08

Start Codex

macOS / Linux
bash
CODEX_HOME="$HOME/.codex-bruceai" codex
STEP 09

Switch models inside Codex

After Codex starts, type /model to switch between gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4, and gpt-5.4-mini.

text
/model

If you select an unsupported model, the BRUCEAI backend will return the current supported model list.

STEP 10

Optional: create an alias

If you do not want to type CODEX_HOME every time, create a bcodex command. In Windows Notepad, paste the function at the end of the file, press Ctrl+S, then close the window.

macOS / Linux
bash
echo 'alias bcodex="CODEX_HOME=\"$HOME/.codex-bruceai\" codex"' >> ~/.zshrc
source ~/.zshrc

After that, run bcodex for BRUCEAI testing. Your original codex command still uses your personal ChatGPT / Codex settings.