CODEX CLI
OpenAI Codex CLI Integration
Use Api.Airforce as a custom model provider in OpenAI's Codex CLI — every chat model on Airforce becomes selectable from the TUI.
Codex CLI is OpenAI's official coding agent. Add Airforce as a model provider in ~/.codex/config.toml to use all OpenAI-compatible models with your existing workflow.
Install
npm install -g @openai/codex
# or: brew install codexQuick Start
Create (or edit) ~/.codex/config.toml and register Airforce as a model provider:
~/.codex/config.toml
model = "gpt-5"
model_provider = "airforce"
[model_providers.airforce]
name = "API Airforce"
base_url = "https://api.airforce/v1"
env_key = "AIRFORCE_API_KEY"
wire_api = "chat"Codex reads the key from the environment variable named in env_key. Set it, then run codex:
macOS / Linux
export AIRFORCE_API_KEY="YOUR_API_KEY"
codexWindows (PowerShell)
$env:AIRFORCE_API_KEY = "YOUR_API_KEY"
codexNote: wire_api = "chat" routes through the OpenAI-compatible /v1/chat/completions endpoint, which works with every chat model on Airforce. Pick a model marked Tools ✓ on the models page for a working coding agent (read/edit/bash).