Codex Deployment Guide

Install OpenAI's Codex CLI, connect it to JZS Token with CC Switch or by hand, and start coding.

What you need

Base URL
https://jzstoken.com/api/v1
Keep /api/v1. Codex appends /responses.
API Key
sk-…
From API Keys.
Model
gpt-5.6-terra
Or any ID from the live catalog. IDs are case-sensitive.
Node.js
18 or newer
Codex installs through npm. Download.

Install Codex first, whichever setup you choose:

npm install -g @openai/codex@latest
codex --version

Linux may need sudo. On Windows, run the terminal as administrator.

Set up with CC Switch (recommended)

CC Switch writes ~/.codex/config.toml for you and lets you switch providers with one click.

1. Open the Codex tab and click +

Select the OpenAI icon in the top bar (1), then click the orange + (2).

CC Switch with the Codex tab selected and the orange plus button highlighted

2. Keep "Custom Configuration"

On the Codex Provider tab, leave Custom Configuration selected and scroll down to the form.

Add New Provider dialog for Codex with Custom Configuration selected

3. Fill in the form

Enter a Provider Name such as JZS Token, then:

  1. API Key: paste your key.
  2. API Request URL: https://jzstoken.com/api/v1. It must end with /v1; leave Full URL off.
  3. Default Model: gpt-5.6-terra, or any model from the catalog.
Codex provider form: API key masked, API Request URL https://jzstoken.com/api/v1, default model gpt-5.6-terra

Click Add.

4. Check that it is in use

The new card is highlighted and its button reads In Use. If another provider is active, hover over the JZS Token card and click Enable.

Codex provider list with the JZS Token card active and marked In Use

5. Start Codex

Open a terminal in your project folder and run codex. The header shows the model from your CC Switch provider.

Codex CLI header showing model gpt-5.6-terra high
💡 Restart Codex after switching providers. It reads config.toml when it starts.

Configured, but the chat never replies?

  1. The request URL is exactly https://jzstoken.com/api/v1: https, with /api/v1 and no trailing slash.
  2. The model ID matches the catalog exactly.
  3. Your key is active and your balance is above zero.
  4. No OPENAI_BASE_URL or OPENAI_API_KEY environment variable overrides the config.

If it still hangs, route Codex through CC Switch: Settings → Routing → Local Routing, switch on Routing Master Switch (1), then Codex under Routing Enabled (2). Start a new Codex session afterwards.

CC Switch Local Routing: master switch on and Running, Codex enabled
⚠️ With routing on, CC Switch has to stay open. Turn Codex off here to go back to a direct connection.

Manual setup

Without CC Switch, Codex needs two files in its config folder:

Windows
%USERPROFILE%\.codex\
Create the folder if it does not exist.
macOS / Linux
~/.codex/
mkdir -p ~/.codex

config.toml

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

[model_providers.jzstoken]
name = "JZS Token"
base_url = "https://jzstoken.com/api/v1"
wire_api = "responses"
requires_openai_auth = true

auth.json

{
  "OPENAI_API_KEY": "sk-your-key-here"
}

On macOS or Linux you can create both from the terminal:

mkdir -p ~/.codex && cd ~/.codex
cat > config.toml << 'EOF'
model_provider = "jzstoken"
model = "gpt-5.6-terra"
model_reasoning_effort = "high"
disable_response_storage = true

[model_providers.jzstoken]
name = "JZS Token"
base_url = "https://jzstoken.com/api/v1"
wire_api = "responses"
requires_openai_auth = true
EOF
cat > auth.json << 'EOF'
{
  "OPENAI_API_KEY": "sk-your-key-here"
}
EOF

Then start Codex in a project folder:

mkdir my-codex-project
cd my-codex-project
codex
💡 wire_api = "responses" matters: Codex talks to the Responses API. If you see 404s, check this line and that base_url ends with /api/v1.

Troubleshooting

  • 401: auth.json is missing, or the key in it is wrong. With CC Switch, re-paste the key in the provider form.
  • 404: base_url is missing /api/v1, or wire_api is not responses.
  • 402: your balance is too low. Add credits.
  • 403 model not supported: your key type does not cover that model. See the model catalog.
  • Still stuck: contact support with a screenshot of the error (hide your key).