llmrelay
// 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.6-terra
Route
openai-compatible
On llmrelay
$1.25/M · $7.5/M

Setup

  1. 1 npm install -g @openai/codex
  2. 2 codex config set base_url https://api.llmrelay.dev/v1
  3. 3 codex config set api_key sk-llmrelay-...
  4. 4 codex config set model gpt-5.6-terra

Config

# ~/.codex/config.toml
base_url = "https://api.llmrelay.dev/v1"
api_key  = "sk-llmrelay-..."
model    = "gpt-5.6-terra"

Smoke test

Copy, paste, run. If you get JSON back with a message, you're good.

codex "say hi"

Gotchas

You need an llmrelay key first

Sign up in about 30 seconds — free to create an account, no subscription, $10 minimum top-up.

Related integrations