Manage ZhiFlo with CC Switch
CC Switch is the shortest path when you do not want to edit configuration files by hand. The goal on this page is simple: make ZhiFlo appear in the Codex provider list and switch it to the active state.
Install and open CC Switch
Section titled “Install and open CC Switch”Go to the CC Switch download page. Expand Assets and choose the installer that matches your operating system and processor. A source-code archive is not an installer.
- Windows: choose a Windows installer that matches the system architecture.
- macOS: choose ARM64 / Apple Silicon for Apple chips or x64 / Intel for Intel Macs.
- Linux: select the package for your distribution or a portable format explicitly provided by the project.
Open CC Switch after installation. Seeing application tabs and provider cards confirms that the app is installed; it does not yet confirm an API request.

The highlighted controls are the Codex tab and add-provider entry. A portal import also lands in this provider list.
Import from the ZhiFlo portal
Section titled “Import from the ZhiFlo portal”- Open API Keys in the ZhiFlo API portal and locate the Token for this device.
- Open the row action menu and select CC Switch.
- Select Codex in Import to CC Switch.
- Select a model available to your account in the same dialog.
- Select Open CC Switch.
- If the browser asks to open an external application, allow it to open the local CC Switch app.
- In the import preview, verify ZhiFlo, Codex, and the complete model ID.
- Confirm the import.
- Confirm that ZhiFlo is active in the Codex provider list. If it is not, activate the card manually.
After a normal import, ZhiFlo should already be the active provider. Return to the Codex provider list and confirm that the card shows Active, Currently enabled, or the equivalent state. If it does not, activate the card manually. Do not rely on the import confirmation alone; use the card state to check whether the provider has switched. The card state still does not prove that a real request works.
Make Codex read the new provider
Section titled “Make Codex read the new provider”Exit all running Codex sessions and close old terminal windows. Open Codex again. A process that was already running before the switch will continue using its old configuration.
Send a prompt that cannot modify files:
Do not modify any files. Reply with OK only.An OK reply means the setup is complete. That final step proves the provider state, Token, model, and real request path are all working together.
If the browser does not open CC Switch
Section titled “If the browser does not open CC Switch”Confirm that CC Switch is installed and has been opened at least once. Return to the signed-in ZhiFlo portal and repeat CC Switch → Open CC Switch. Do not copy or forward the generated app deep link.
If the operating system still cannot open the app, go to the Codex tab in CC Switch and select the + control to open the provider options:

The screenshot uses the Chinese interface and highlights 自定义配置, which means Custom configuration. Select it to open the form for the fields below.
Enter these values:
| Field | Value |
|---|---|
| Name | ZhiFlo |
| Base URL / API address | https://api.zhiflo.com/v1 |
| API Key / Token | The ZhiFlo Token dedicated to this device |
| Model | A complete model ID from your account |
| Request mode, if shown | Responses |
Save the provider, then select its card and enable it. Saving alone does not make it current.
Quick recovery
Section titled “Quick recovery”- No ZhiFlo card after importing: reopen the preview and complete the final import confirmation.
- The card exists, but Codex uses the old provider: enable ZhiFlo, then exit and reopen Codex completely.
- The client reports a model error: copy the full model ID from your account and update or re-import the provider.
- The client returns
401: check that the Token is active and that no whitespace was added while pasting it. If you previously setCODEX_API_KEYby hand, follow the401troubleshooting step to clear the old variable before starting Codex again.