Skip to content

Codex Setup

Codex is OpenAI's official coding assistant CLI. model-go speaks the OpenAI API format, so you can connect it directly.

Prerequisites

  • You have created an API token in model-go
  • You have installed Node.js 18+ Environment Check

Install

bash
npm install -g @openai/codex
powershell
npm install -g @openai/codex

Verify the installation:

bash
codex --version

Configuration

Codex can read API settings from a config file.

toml
model_provider = "model-go"
model = "replace with a model name from the Models page"

[model_providers.model-go]
name = "model-go"
base_url = "https://model-go.com/v1"
wire_api = "responses"
requires_openai_auth = true
toml
# 1. Press Win+R, type %USERPROFILE%, and press Enter
# 2. Create the .codex folder
# 3. Create config.toml and auth.json inside that folder

model_provider = "model-go"
model = "replace with a model name from the Models page"

[model_providers.model-go]
name = "model-go"
base_url = "https://model-go.com/v1"
wire_api = "responses"
requires_openai_auth = true

You also need an auth.json file in the same directory as config.toml:

json
{
  "OPENAI_API_KEY": "your model-go token"
}
json
{
  "OPENAI_API_KEY": "your model-go token"
}

Creating the .codex folder on Windows

powershell
mkdir "%USERPROFILE%\.codex"

Configuration Notes

SettingPurpose
base_urlmodel-go OpenAI-compatible endpoint: https://model-go.com/v1
OPENAI_API_KEYThe API token you created in model-go
modelThe model name shown in the Models page

WARNING

Codex requires the /v1 suffix. Make sure you use https://model-go.com/v1, not https://model-go.com.

Launch

bash
cd your-project-folder
codex

Common Issues

See the Codex FAQ.