English
Codex CLI Setup Guide
1. Open the configuration directory
The Codex directory is .codex in your home directory. Run codex once if it has not been created.
2. Edit config.toml
toml
model_provider = "yuan_api"
model = "your-model-id"
[model_providers.yuan_api]
name = "Yuan API"
base_url = "https://api.apixhm.com/v1"
wire_api = "responses"
requires_openai_auth = true3. Edit auth.json
json
{
"OPENAI_API_KEY": "your-api-key"
}Restart the terminal and run codex. Do not duplicate /v1.
