Skip to main content

Install Codex CLI

Install Codex CLI globally with npm:
# Version 0.57.0 is recommended
npm i -g @openai/codex@0.57.0

Configure ApiGo API

Important: clear OpenAI environment variables before use Before configuring, clear the following OpenAI-related environment variables so they do not override your ApiGo settings:
  • OPENAI_BASE_URL
  • OPENAI_API_KEY

Choose an integration method

  1. Edit Codex’s config file at .codex/config.toml and add:
[model_providers.apigo]
name = "Chat Completions API"
base_url = "https://api.apigo.ai/v1"
env_key = "APIGO_API_KEY"
wire_api = "chat"
requires_openai_auth = false
request_max_retries = 4
stream_max_retries = 10
stream_idle_timeout_ms = 300000

[profiles.apigo]
model = "gpt-5.4"
model_provider = "apigo"
  1. Set APIGO_API_KEY to your platform key.
  2. Launch Codex CLI with the configured profile:
codex --profile apigo