Documentation
Everything you need to plug CheapAI into your tooling — setup guides for popular agents, API reference, FAQ.
Codex
OpenAI Codex CLI
Create an API key on the Keys page and copy it.
Install Node.js 18+, then the Codex CLI:
npm install -g @openai/codexAdd the provider to ~/.codex/config.toml (user-level only — Codex ignores project-local configs):
model = "gpt-5.6-sol"
model_provider = "cheapai"
[model_providers.cheapai]
name = "CheapAI"
base_url = "https://cheapai.io/v1"
env_key = "CHEAPAI_API_KEY"
wire_api = "responses"
requires_openai_auth = trueCreate ~/.codex/auth.json so Codex stops treating you as signed in with an OpenAI account:
{
"auth_mode": "apikey",
"OPENAI_API_KEY": "YOUR_API_KEY"
}Export your key — macOS / Linux (add to ~/.zshrc for persistence):
export CHEAPAI_API_KEY="YOUR_API_KEY"Windows PowerShell: $env:CHEAPAI_API_KEY = "YOUR_API_KEY"
Run codex. The model is any slug from our catalog (e.g. gpt-5.6-sol, claude-opus-4-8) without a vendor prefix.
wire_api = "responses" — Codex removed the chat mode in early 2026. The provider id can't be openai / ollama / lmstudio (reserved) — that's why we use cheapai.Replace YOUR_API_KEY with a real key from the Keys section.