# Codex API Setup: Passion8, CC Switch and config.toml

> Configure Codex for Passion8 with CC Switch or auth.json and config.toml. Set the API key, Base URL, Responses model, and route-specific context limits.

URL: https://docs.passion8.cc/en/docs/codex/config
Language: en
Publisher: Passion8
Last updated: 2026-10-11

Local Codex access needs only a **Passion8 URL, API key, and enabled Responses-compatible model**. Use [CC Switch](#configure-with-cc-switch-recommended) to manage configuration, or write the files manually below. Restart Codex after saving and verify the test request in the dashboard. An OpenAI account or browser OAuth is not required.




Two files are involved: `auth.json` stores `OPENAI_API_KEY`; `config.toml` defines the model, provider, base URL and permissions. The base URL must be `https://passion8.cc/v1`, including `/v1`. Put the key in `auth.json`, not in the TOML configuration.




## Passion8 model and current official models

Checked on 2026-10-11. Passion8 examples consistently use the deployment-backed `gpt-6-sol`, with a client context limit of `272000` and compaction threshold of `250000`. Current official Codex documentation recommends `gpt-6.1-sol` where available. An upstream release does not establish that your Passion8 token has access. Use the model permissions shown in your console and recheck limits when changing models.

Configuration cleanup: `disable_response_storage` and `approvers_reviewer` are absent from the current official reference and have been removed. There is no direct replacement that guarantees equivalent behavior. Data retention follows provider policy; approvals use `approval_policy` and `sandbox_mode`. The old template also placed `suppress_unstable_features_warning` incorrectly under `[features]`; the unnecessary suppression is omitted. `review_model`, `show_raw_agent_reasoning` and `model_supports_reasoning_summaries` remain documented. The latter two only affect models that support the relevant behavior.

## Before configuring

| Item | Value |
| --- | --- |
| Passion8 API key | Create a token in the console and copy the complete key |
| Model ID | Copy a Codex / Responses-compatible model from the [model catalog](https://passion8.cc) |

The examples use `gpt-6-sol`. If it is not available to your account, replace the model setting with an enabled ID.

## Configure with CC Switch (recommended)

CC Switch manages Codex providers visually and writes `auth.json` and `config.toml`. The fields are the same on macOS and Windows.







### Install and open CC Switch

Download your platform's build from [CC Switch Releases](https://github.com/farion1231/cc-switch/releases), switch to GPT / Codex and add a provider.





### Enter Passion8 settings

| Field | Value |
| --- | --- |
| Provider name | `Passion8` |
| API Base URL | `https://passion8.cc/v1` |
| API Key | Your Passion8 API key |
| Model | An enabled Codex / Responses model ID; this example uses `gpt-6-sol` |





### Check context limits against the manual configuration

After saving, open `~/.codex/config.toml` or `%USERPROFILE%\.codex\config.toml` on Windows. Match the manual setup's values for the Passion8 `gpt-6-sol` route:

```toml
model = "gpt-6-sol"
review_model = "gpt-6-sol"
model_context_window = 272000
model_auto_compact_token_limit = 250000
```

Add missing settings. If CC Switch writes `model_catalog_json`, check the model's `context_window` and `max_context_window` there too. Do not invent a million-token client window for a route configured with a smaller limit. When changing models, use the actual route limit and a suitable compaction threshold; the separate [Grok guide](https://docs.passion8.cc/en/docs/grok) covers that provider.





### Save and test

Activate the provider after saving. Open a new terminal or PowerShell window and run:

```bash
codex "Describe this project in one sentence"
```

After receiving an answer, match its time, model and usage in the Passion8 console to verify the actual route.









If Windows symlink synchronization fails, use CC Switch's file-copy strategy if offered, or check its administrator/developer-mode requirements.




## Manual configuration

Use this path if you prefer not to install CC Switch or want direct control of both files. Back up existing files before replacing them. The provider, model, base URL and context settings should match the CC Switch result.





### macOS


Authentication file: `~/.codex/auth.json`.

```bash
mkdir -p ~/.codex
cat > ~/.codex/auth.json << 'EOF'
{
  "OPENAI_API_KEY": "YOUR_PASSION8_API_KEY"
}
EOF
```

Configuration: `~/.codex/config.toml`.

```bash
cat > ~/.codex/config.toml << 'EOF'
model_provider = "Passion8"
cli_auth_credentials_store = "file"
forced_login_method = "api"
model = "gpt-6-sol"
review_model = "gpt-6-sol"
model_reasoning_effort = "medium"
model_context_window = 272000
model_auto_compact_token_limit = 250000
approval_policy = "on-request"
web_search = "live"
sandbox_mode = "workspace-write"
model_supports_reasoning_summaries = true
personality = "pragmatic"
show_raw_agent_reasoning = true

[model_providers]
[model_providers.Passion8]
name = "Passion8"
wire_api = "responses"
requires_openai_auth = true
base_url = "https://passion8.cc/v1"

[features]
goals = true
EOF
chmod 600 ~/.codex/auth.json
```

Test:

```bash
codex "Describe this project in one sentence"
```



### Windows


Authentication file: `%USERPROFILE%\.codex\auth.json`.

```powershell
New-Item -ItemType Directory -Force "$env:USERPROFILE\.codex"
@'
{
  "OPENAI_API_KEY": "YOUR_PASSION8_API_KEY"
}
'@ | Set-Content -Encoding UTF8 "$env:USERPROFILE\.codex\auth.json"
```

Configuration: `%USERPROFILE%\.codex\config.toml`.

```powershell
@'
model_provider = "Passion8"
cli_auth_credentials_store = "file"
forced_login_method = "api"
model = "gpt-6-sol"
review_model = "gpt-6-sol"
model_reasoning_effort = "medium"
model_context_window = 272000
model_auto_compact_token_limit = 250000
approval_policy = "on-request"
web_search = "live"
sandbox_mode = "workspace-write"
model_supports_reasoning_summaries = true
personality = "pragmatic"
show_raw_agent_reasoning = true

[model_providers]
[model_providers.Passion8]
name = "Passion8"
wire_api = "responses"
requires_openai_auth = true
base_url = "https://passion8.cc/v1"

[features]
goals = true
'@ | Set-Content -Encoding UTF8 "$env:USERPROFILE\.codex\config.toml"
```

Test:

```powershell
codex "Describe this project in one sentence"
```

Use PowerShell 7 for BOM-free UTF-8 output. With Windows PowerShell 5.1, save these files as UTF-8 without BOM in an editor if the client reports a parse error. If the script wrapper is blocked, run `codex.cmd`.









If `gpt-6-sol` is unavailable, replace `model` and `review_model` with an enabled Codex / Responses ID from the [catalog](https://passion8.cc), and check its context and compaction limits.

CC Switch and manual configuration should agree. `272000` / `250000` are the deployed client settings for this Passion8 route, not the official maximum context or a price guarantee. Recheck limits for other models.

Restart Codex after changing configuration; existing processes may retain old settings.




## Common checks

```bash
codex --version
codex "hello"
```

Check these when troubleshooting:

- The authentication field is exactly `OPENAI_API_KEY`.
- The base URL is `https://passion8.cc/v1`.
- The model is enabled for Codex / Responses on your Passion8 account.
- Custom routes should use their documented context/compaction settings.

Avoid conflicting active configurations. If `CODEX_HOME` is set, it determines the configuration directory. The fixed field name `OPENAI_API_KEY` holds your Passion8 key; this setup uses API credentials, not browser OAuth.

## Gateway Setup FAQ

### Does OPENAI_API_KEY need an OpenAI-issued key?

This is Codex’s fixed authentication field name; enter your **Passion8 API key**. The configured `base_url` sends requests to `https://passion8.cc/v1`. Local gateway access does not require an OpenAI account or browser OAuth.

### Can I enter any GPT model ID?

No. The model must be enabled for your token and support the Responses protocol used by Codex. Copy the exact ID from the dashboard and check context and compaction limits when switching models. A Chat Completions model that works in Cline may not work in Codex.

### Do I need to configure the VS Code extension separately?

A local extension and CLI share user-level configuration; see the [Codex VS Code extension guide](https://docs.passion8.cc/en/docs/codex/ide). Remote SSH, WSL, and containers read configuration in their own runtime environment, so check the actual user directory. To switch four vendors in one editor extension, see [Cline multi-model configuration](https://docs.passion8.cc/en/docs/cline).

## Next steps



- [Install Codex](https://docs.passion8.cc/en/docs/codex/install): CLI, desktop and official IDE installation.
- [Troubleshooting](https://docs.passion8.cc/en/docs/codex/troubleshooting): Authentication, model, Responses and permission errors.

