Codex Setup
Codex is OpenAI's command-line coding tool. To use it through Yunxi AI, configure a Yunxi AI model provider and authenticate with a dedicated Codex key.
Prerequisites
- You have signed in to
https://ai.laiber.cloud. - You have created a Codex API key.
- Node.js and npm are installed.
Recommended
If CC-Switch is installed, open the key action menu, choose CC Switch, select Codex, and import the model profile directly. The config.toml method below is a manual fallback.
Install Codex
npm install -g @openai/codex@latestVerify:
codex --versionCreate the config directory
mkdir -p ~/.codex
cd ~/.codexWrite config.toml
The example below uses the OpenAI Responses-compatible endpoint. Adjust model based on models available to your account.
model_provider = "yunxi"
model = "gpt-5.5"
model_reasoning_effort = "high"
disable_response_storage = true
[model_providers.yunxi]
name = "Yunxi AI"
base_url = "https://ai.laiber.cloud/v1"
wire_api = "responses"
requires_openai_auth = trueWrite auth.json
Replace sk-xxx with your Codex key:
{
"OPENAI_API_KEY": "sk-xxx"
}Start Codex
cd your-project
codexAsk Codex to inspect the current directory or create a small test file to confirm requests are working.
FAQ
Can Codex and Claude Code share one key?
Not recommended. Their protocols and model groups may differ, so separate keys are easier to debug and revoke.
Where are config files stored?
By default, Codex reads from ~/.codex.