// CLI Agent
Use Codex CLI with llmrelay
OpenAI's official coding CLI, redirectable to any OpenAI-compatible endpoint. Point it at api.llmrelay.dev and get the same models at half the price.
Recommended model
gpt-5
Route
openai-compatible
On llmrelay
$2.5/M · $10/M
Setup
- 1 npm install -g @openai/codex
- 2 codex config set base_url https://api.llmrelay.dev/v1
- 3 codex config set api_key sk-llmrelay-...
- 4 codex config set model gpt-5
Config
# ~/.codex/config.toml base_url = "https://api.llmrelay.dev/v1" api_key = "sk-llmrelay-..." model = "gpt-5"
Smoke test
Copy, paste, run. If you get JSON back with a message, you're good.
codex "say hi"
Gotchas
- !Codex CLI shells out to your llmrelay endpoint for /v1/chat/completions. Streaming is supported.
You need an llmrelay key first
Sign up in about 30 seconds. New accounts get $0.20 in free credit — enough to smoke-test every model.