Codex CLI with gpt88.cc
Connect Codex CLI to gpt88.cc, switch between API key and OAuth modes, understand plugin limits, and recover tool execution when sessions break.
Bottom line first
The core path is simple: install the CLI, point it at https://api.gpt88.cc, and verify the toolchain with a task that actually reads and writes files. If plugin capability is missing, first check whether you are still in API key mode.
Preparation
1. Install Codex CLI
2. Prepare a gpt88.cc API key
3. Decide whether you need API key mode or OAuth mode
4. Confirm the OpenAI-compatible Base URL: https://api.gpt88.cc
5. Prepare one minimal verification task, such as "create hello.txt"Step 1: Install Codex CLI
If Codex CLI is not installed yet, install it and confirm the command exists.
# macOS / Linux
npm install -g @openai/codex
# verify
codex --versionStep 2: Configure API key mode
API key mode is for normal model usage. The two key checks are whether base_url includes/v1 and whether the model name is a real model ID currently supported by gpt88.cc.
[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://api.gpt88.cc"
wire_api = "responses"
requires_openai_auth = true
[profiles.gpt88]
model_provider = "OpenAI"
model = "gpt-5-2-chat-latest"If you prefer environment variables, set them in the terminal session:
export OPENAI_API_KEY="sk-your-gpt88-api-key"
export OPENAI_BASE_URL="https://api.gpt88.cc"Step 3: Verify file tools
Do not stop at a simple chat reply. Codex is an agent, so the critical check is whether it can read files, write files, and continue an implementation task.
codex --profile gpt88
# after the session opens, ask:
Create a file named hello.txt with the content "hello gpt88", then check whether the file was written successfully.- Start Codex CLI.
- Ask it to create a small file.
- Ask it to read the file back and confirm the content.
- If file tools are unavailable, fix tool state first instead of changing models.
OAuth and plugin capability
1. For pure model access: use API key mode
2. For ChatGPT account plugin capability: log out of API key mode and use OAuth
3. In OAuth mode, do not keep OPENAI_API_KEY or OPENAI_BASE_URL in the environment
4. If you use CC-Switch, confirm the route is enabled
5. After switching modes, start a fresh Codex session and verify againIf your real goal is plugin capability, continue with the Codex OAuth plugin guide. If you only need stable model access through gpt88.cc, API key mode is the simpler route.
Troubleshooting
1. New sessions reconnect repeatedly
- Check proxy variables and old API key variables
- Clear them and reopen the terminal
2. Tools suddenly become unavailable and code cannot be written
- Ask Codex to check whether file tools are currently available
- After tools recover, explicitly tell Codex: tools are restored, start implementing from step one
- This is usually a session tool-state issue, not a model issue
3. 401 response
- API key is wrong or lacks permission
4. 404 response
- Base URL or model name is wrong
5. Plugin features are unavailable
- This is expected if you are logged in with API key mode
- Exit API key login and switch to OAuthFurther reading
- freestylefly/CodexGuide for broader Codex onboarding, CLI configuration, and workflow practices.