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 docs, or use the command below:
npm install -g @openai/codexCC Switch: download it only from the CC Switch website or the official GitHub Releases.
Add MaiToken in CC Switch
Open CC Switch and select Codex in the app switcher at the top.
Click + in the top-right corner and choose App-specific provider.
Under presets, choose Custom and fill in the following:
Setting Value Name MaiToken API Key Your MaiToken API key API endpoint / Base URL https://api.maitoken.com/v1Model gpt-5.3-codexAPI protocol Responses Requires local route mapping Off 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 turn on "Requires local route mapping." That toggle is for providers that only support Chat Completions.
Launch and Verify
codexOnce inside Codex, send a simple task, for example:
Inspect the current project and describe its main directory structure.If it returns a result normally, the integration is working.
Switching Models
If your account has other Responses models enabled, you can edit the MaiToken provider and change the model. CC Switch's model input can fetch the available list via /v1/models; you can also check model IDs on the MaiToken model list.
Common choices:
| Model | Use Case |
|---|---|
gpt-5.3-codex |
Default recommendation, suitable for most coding tasks |
gpt-5.3-codex-spark |
Coding tasks that prioritize response speed |
gpt-5.3-codex-official |
Use when you need an official direct channel |
Tip: Whether a model is available depends on your account and channel configuration. Prefer the
/v1/modelslist fetched by CC Switch as the source of truth.
FAQ
Still using the old provider after enabling
Codex does not hot-reload provider configuration. Fully exit Codex, reopen the terminal, and then start codex again.
401 Unauthorized
- Check that the API Key in CC Switch is complete.
- Confirm the key is valid in the MaiToken Console.
- Make sure your account balance is sufficient.
404 or wrong Responses path
Confirm the Base URL is https://api.maitoken.com/v1, the API protocol is Responses, and "Requires local route mapping" is off.
Model unavailable
In CC Switch, click "Fetch models" next to the model field, or call GET https://api.maitoken.com/v1/models to check which models are available for the current key.
Config files and key safety
CC Switch manages ~/.codex/auth.json and ~/.codex/config.toml. Don't commit these files, your API Key, or screenshots containing the key to a Git repository.
For more on using CC Switch, see its official user manual.
