3.1 Codex
Applies to the Codex CLI, Codex VSCode extension, and Codex mobile app. All three share the same API configuration; only the place where you enter it differs.
Prepare two things
| Setting | Value |
|---|---|
| Base URL | https://axiomcode.top/v1 |
| API Key | sk-axiom-xxxx (from 2.2 Create a Key) |
System requirements
| Form factor | Requirements |
|---|---|
| Codex CLI | Node.js 18+; Windows 10/11 · macOS · Linux (incl. WSL) |
| VSCode plugin | Latest VS Code + the Codex extension |
| Mobile app | iOS / Android, from the app store |
Method 1: Environment variables (fastest)
Set the address and key as environment variables (pick your OS):
bash
# Append to ~/.zshrc or ~/.bashrc, then run source to apply
export OPENAI_API_KEY="sk-axiom-your-key"
export OPENAI_BASE_URL="https://axiomcode.top/v1"powershell
# Persist to user environment variables; takes effect after reopening the terminal
[Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "sk-axiom-your-key", "User")
[Environment]::SetEnvironmentVariable("OPENAI_BASE_URL", "https://axiomcode.top/v1", "User")Method 2: Config file
Config file location:
- macOS / Linux:
~/.codex/config.toml - Windows:
C:\Users\<username>\.codex\config.toml
toml
[provider.axiom]
base_url = "https://axiomcode.top/v1"
api_key = "sk-axiom-your-key"
[default]
provider = "axiom"
model = "gpt-5-codex"Verify
Run in the terminal:
bash
codex --version
codex chat "Introduce quicksort in one sentence"If it returns a normal response, the connection is working.
Codex VSCode extension
- Search for and install "Codex" in the VSCode extension marketplace.
- Open Settings (
Ctrl/⌘ + ,) and search forcodex. - Fill in two fields:
Codex: Api Base Url→https://axiomcode.top/v1Codex: Api Key→sk-axiom-your-key
- Press
Ctrl/⌘ + Shift + P, typeCodex: Reload, or restart VSCode. - Open any file and press the default shortcut
Ctrl/⌘ + Ito test.
Codex mobile app
- Search for and install the "Codex" app from the app store.
- Go to Settings → API Access.
- Fill in:
- API URL:
https://axiomcode.top/v1 - API Key:
sk-axiom-your-key
- API URL:
- Save and start a new conversation to test.
Recommendation
Generate a dedicated Key for the mobile app. If the device is lost, you only need to disable this Key, without affecting other Keys on your computer or server.
FAQ
| Question | Notes |
|---|---|
| Which model should I pick? | gpt-5-codex is the default recommendation; see the Key's "Access Configuration" dialog for available models |
| Returns 401 | 99% of the time the Key is wrong (extra space, missing sk- prefix) — check it on the Key management page |
| Returns 404 / model not found | The Base URL is wrong (missing /v1 or has an extra path), or the model is not available for your account |
Next: 3.2 Claude Code