Codex CLI: Manual Configuration
Codex CLI can use an OpenAI-compatible provider through the Codex configuration directory. Replace the model name in the example with a model available to your key group.
Access Information
| Item | Value |
|---|---|
| OpenAI-compatible endpoint | https://ai.hctopup.com/v1 |
| Example model | gpt-5.5 |
| API Key | Use the Key created in HCAI |
Configuration Path
| Platform | Configuration directory |
|---|---|
| Windows | %USERPROFILE%\.codex\ |
| macOS / Linux | ~/.codex/ |
Create Configuration Files
Create or update config.toml in the configuration directory:
toml
model_provider = "hcai"
model = "gpt-5.5"
disable_response_storage = true
[model_providers.hcai]
name = "HCAI"
base_url = "https://ai.hctopup.com/v1"
wire_api = "responses"
requires_openai_auth = trueCreate or update auth.json in the same directory:
json
{
"OPENAI_API_KEY": "Replace with your HCAI Key"
}Start Codex CLI
sh
cd /path/to/your/project
codexIf the model is unavailable, make sure model exactly matches a model available to the current key group.