Tutorial · Codex
Connect the OpenAI Codex CLI
The Codex CLI is OpenAI-style compatible. Point OPENAI_BASE_URL at LowCostAI.
Connect in three steps
The Codex CLI reads the endpoint and credentials from env vars.
Step 1
Create an API keyCreate a key.
Step 2
Set env varsExport OPENAI_BASE_URL and OPENAI_API_KEY.
Step 3
Run CodexRun codex in your project.
Configuration
export OPENAI_BASE_URL="https://api.lowcostaiapi.com/v1" export OPENAI_API_KEY="YOUR_TOKEN" codex "add unit tests for utils.py"
Use a model name from the Models page.