> ## Documentation Index
> Fetch the complete documentation index at: https://nemonist.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Add nemonist as a model provider in the Codex CLI.

**1. Add a nemonist provider**

Add a nemonist provider to your Codex config, `~/.codex/config.toml`:

```toml theme={null}
model_provider = "nemonist"
model = "openai/gpt-5.5"

[model_providers.nemonist]
name = "nemonist"
base_url = "https://nemonist.com/api/v1"
env_key = "NEMONIST_API_KEY"
wire_api = "responses"
```

**2. Put your key in your shell profile**

```bash theme={null}
export NEMONIST_API_KEY="sk-nm-..."
```

**3. Start Codex**

Start `codex` in your project. Change models with `model` in the config, or `codex -m <model>`.

## Codex in the ChatGPT desktop app

The desktop app reads the same `~/.codex/config.toml`, but it does not read your shell profile, so it never sees a key you `export` there.

**1. Give the app your key**

On macOS, run this, then fully quit and reopen the app:

```bash theme={null}
launchctl setenv NEMONIST_API_KEY "sk-nm-..."
```

This is cleared when you log out or restart, so run it again after that. On Windows, run `setx NEMONIST_API_KEY "sk-nm-..."` once, then reopen the app.

**2. If a change seems ignored**

The app can leave background processes running after you quit, and they keep the old key and config. Quit the app, end any leftover ChatGPT or Codex processes from OpenAI in Activity Monitor (macOS) or Task Manager (Windows), then reopen it. Logging out and back in also works; on macOS run `launchctl setenv` again first.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.