Prerequisites
Before you begin, prepare the following:
MaiToken API Key: Go to the MaiToken Console to create a key.
Codex CLI: Install it by following the official Codex documentation, or use the following command:
npm install -g @openai/codexCC Switch: Download it only from the CC Switch official website or the official GitHub Releases.
Add MaiToken in CC Switch
Open CC Switch and select Codex from the application switcher at the top.
Click + in the upper-right corner and select App-Specific Provider.
Select Custom from the presets and enter the following:
Configuration Item Value Name MaiToken API Key Your MaiToken API key API Endpoint / Base URL https://api.maitoken.net/v1Model gpt-5.3-codexAPI Protocol Responses Local Route Mapping Required Disabled Click Add, then click Enable on the MaiToken provider card.
Close any running Codex and terminal windows, then reopen the terminal for the configuration to take effect.
Note: MaiToken natively supports
POST /v1/responses, so do not enable "Local Route Mapping Required." This option is intended for providers that support only Chat Completions.
Launch and Verify
codexAfter entering Codex, send a simple task, for example:
Inspect the current project and describe its main directory structure.If a result is returned successfully, the integration is working.
Switch Models
If your account has access to other Responses models, you can edit the MaiToken provider and change the model. The model input field in CC Switch supports retrieving the available list through /v1/models; you can also visit the MaiToken Model List to view model IDs.
Common choices:
| Model | Use Case |
|---|---|
gpt-5.3-codex |
Recommended by default; suitable for most coding tasks |
gpt-5.3-codex-spark |
Coding tasks that prioritize response speed |
gpt-5.3-codex-official |
Use when an official direct connection is required |
Tip: Model availability depends on your account and channel configuration. Use the
/v1/modelslist retrieved by CC Switch as the primary reference.
Troubleshooting
The Old Provider Is Still Used After Enabling MaiToken
Codex does not hot-reload provider configurations. Exit Codex completely, reopen the terminal, and then start codex again.
401 Unauthorized
- Check whether the API Key in CC Switch is complete.
- Confirm that the key is valid in the MaiToken Console.
- Confirm that your account has sufficient balance.
404 or Incorrect Responses Path
Confirm that the Base URL is https://api.maitoken.net/v1, the API protocol is Responses, and "Local Route Mapping Required" is disabled.
Model Unavailable
In CC Switch, click "Fetch Models" next to the model field, or call GET https://api.maitoken.net/v1/models to check which models are available for the current key.
Configuration File and Key Security
CC Switch manages ~/.codex/auth.json and ~/.codex/config.toml. Do not commit these files, your API Key, or screenshots containing keys to a Git repository.
For more instructions on using CC Switch, refer to its official user manual.
