Integrations
Codex by CCS
Integration Overview
This page explains how to connect Codex to UnifyLLM through CC Switch. Add UnifyLLM under Unified Providers, choose the NewAPI preset, enable Codex, and enter the root API address https://api.unifyllm.top. Then return to Codex settings and click Edit Provider: CC Switch will automatically show the request address with the /v1 suffix (https://api.unifyllm.top/v1). Select the native Responses format.
Install Codex: Desktop or CLI
You can use the Codex desktop app (now included in the ChatGPT desktop app) or Codex CLI. Download the desktop app from the official OpenAI Codex page or get it from the Microsoft Store; install the CLI in a terminal when needed. The recommended order is: install and sign in to ChatGPT desktop first, configure Codex through CC Switch, then launch Codex. Once configured, Codex normally works without another sign-in step.
- 1
macOS / Linux: install the CLI
Run the official standalone installer from Terminal, iTerm2, or another bash/zsh shell.
- 2
Windows: install the CLI
Run the PowerShell installer from PowerShell or Windows Terminal. Do not paste PowerShell syntax directly into Git Bash.
- 3
Install and sign in to ChatGPT first
For the desktop route, install the ChatGPT desktop app and complete its sign-in; Codex is included in the desktop app.
- 4
Configure Codex through CC Switch
Open CC Switch, add and enable UnifyLLM under Unified Providers, and finish the Codex configuration before launching Codex.
- 5
Launch and verify
Open a project directory and run codex, or open Codex from the ChatGPT desktop app. Once the provider is active, send a request without repeating the Codex sign-in flow.
- 6
Verify the command
Run codex --version. If the command is not found, restart the terminal and check the PATH written by npm or the standalone installer.
1# macOS / Linux2curl -fsSL https://chatgpt.com/codex/install.sh | sh3 4# Windows PowerShell5powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"6 7# cross-platform npm fallback8npm install -g @openai/codex9 10# start in a project11codexBefore You Start
- Unified Provider API address: https://api.unifyllm.top (CC Switch automatically shows https://api.unifyllm.top/v1 as the Codex request address)
- An active UnifyLLM API key
- A currently available model ID, for example gpt-5.6-sol. Models, groups, and prices can change; use the live pricing page and console model list as the source of truth.
Configure It in CC Switch
- 1
Install and open CC Switch
Open provider management and select Codex in the application switcher.
- 2
Open Unified Providers
Click + and add UnifyLLM under Unified Providers, not under an application-specific provider list.
- 3
Choose the NewAPI preset
Set the preset type to NewAPI and name the provider UnifyLLM.
- 4
Choose the format and endpoint
Select Responses (native format); in Unified Providers, enter the root API address https://api.unifyllm.top and paste your API key. After saving, return to Codex settings and click Edit Provider to confirm that the request address automatically shows https://api.unifyllm.top/v1. Do not manually add /v1 to the Unified Provider address.
- 5
Add and select a model
Add gpt-5.6-sol or choose the exact ID from Get Models. If the list is empty, check the address, key, and whether CC Switch has automatically added /v1 in Codex settings.
- 6
Enable the provider
Enable the card and restart the tool as required by Codex. Add UnifyLLM under Unified Providers, choose the NewAPI preset, enable Codex, and enter the root API address https://api.unifyllm.top. Then return to Codex settings and click Edit Provider: CC Switch will automatically show the request address with the /v1 suffix (https://api.unifyllm.top/v1). Select the native Responses format.
Recommended Values
Protocol: Responses (native format)
Unified Provider API address: https://api.unifyllm.top
Codex request address (automatic suffix): https://api.unifyllm.top/v1
Example model: gpt-5.6-sol
1Unified Provider API address: https://api.unifyllm.top2Codex request address after CC Switch: https://api.unifyllm.top/v13Protocol: Responses (native format)4Model: gpt-5.6-sol5Authorization: Bearer <YOUR_API_KEY>Manual Configuration Reference
If you are not using CC Switch, the following is a reference for the common configuration format of this tool. Field names can change between releases, so prefer the tool's own documentation when it differs.
1model = "gpt-5.6-sol"2model_provider = "unifyllm"3 4[model_providers.unifyllm]5name = "UnifyLLM"6base_url = "https://api.unifyllm.top/v1"7env_key = "UNIFYLLM_API_KEY"8wire_api = "responses"Test and Troubleshoot
After saving the provider, launch Codex and send a small coding request. No additional Codex sign-in is normally required after ChatGPT and CC Switch have been configured. Check the console usage log for the selected model and token cost.
API references: Chat Completions, Responses, Messages, and Generate Content.
- Start with a short request before running a large workload.
- Match the model ID exactly with the pricing page and console, including any group prefix.
- Review console usage logs for delivery, the actual model, token usage, and errors.
- Confirm that Codex settings automatically show https://api.unifyllm.top/v1 as the request address. If not, open Edit Provider again and check the selected app and preset. Do not add /v1 twice in Unified Providers.
Official CC Switch References
This guide references the official CC Switch introduction, Add Provider, and Edit Provider. Field names and paths may change after a CC Switch update; use its latest documentation and application UI as the final reference.
Security Reminder
An API key is an account credential. Use a dedicated key, limit where it is stored, and disable/recreate it immediately if it leaks. Never place it in browser code, a public repository, screenshots, or third-party sync services.