Codex CLI
Run OpenAI's Codex CLI and the Codex extension against the gateway.
Codex CLI reads the standard OpenAI environment variables, so redirecting it needs no patch.
export OPENAI_BASE_URL="https://aiprimetech.io/v1"
export OPENAI_API_KEY="sk-your-key"
codex
Config file
"c"># ~/.codex/config.toml
model = "gpt-5.5"
model_provider = "claudeapikey"
[model_providers.claudeapikey]
name = "ClaudeAPIKey.dev"
base_url = "https://aiprimetech.io/v1"
env_key = "OPENAI_API_KEY"
Both GPT and Claude ids work here — the gateway translates, so you can run Codex CLI against claude-sonnet-4-6 if you prefer it.
Codex is an agent and streams heavily. If output arrives in one lump rather than progressively, a proxy between you and the gateway is buffering — see Streaming.