Skip to content

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

ItemValue
OpenAI-compatible endpointhttps://ai.hctopup.com/v1
Example modelgpt-5.5
API KeyUse the Key created in HCAI

Configuration Path

PlatformConfiguration 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 = true

Create 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
codex

If the model is unavailable, make sure model exactly matches a model available to the current key group.

Next Steps