Codex CLI2 min read

Codex CLI without a ChatGPT subscription

Codex CLI does not need a ChatGPT login. Any OpenAI-compatible provider works, and the setup is one config file plus one environment variable.

In short

Create ~/.codex/config.toml with a klinch provider pointing at https://api.klinch.cloud/v1, put your key into KLINCH_API_KEY and run codex. The default model is gpt-6.1-sol, and Claude and DeepSeek work too.

Contents4

config.toml

Location: ~/.codex/config.toml, on Windows %USERPROFILE%\.codex\config.toml.

Code
model = "gpt-6.1-sol"
model_provider = "klinch"

[model_providers.klinch]
name = "Klinch"
base_url = "https://api.klinch.cloud/v1"
env_key = "KLINCH_API_KEY"
wire_api = "responses"

Key and launch

Terminal
export KLINCH_API_KEY="kl_live_…"
codex

PowerShell: $env:KLINCH_API_KEY="kl_live_…", then codex. To keep it, use setx and open a new terminal.

Models

ModelWhenOur price per 1M, in / out
gpt-6.1-soldefault, native to Codex$0.2 / $1
gpt-6.1-terralighter, half the price$0.1 / $0.5
claude-sonnet-5-5if you prefer Claude$0.2 / $1

Common issues

  • Codex asks you to sign in with ChatGPT. It does not see model_provider = "klinch"; check the file location.
  • 401. The variable was set in another terminal window.
  • 404. base_url needs exactly one /v1 and no trailing slash.
FAQ

FAQ

Do I need ChatGPT Plus for Codex CLI?

No. Codex CLI works with any OpenAI API provider; with KLINCH you pay per token.

Can Codex CLI use Claude?

Yes. Set model = "claude-sonnet-5-5" in config.toml. Same key, same balance.

More posts

Try KLINCH

Claude, GPT, Gemini, DeepSeek and Grok on one key at a tenth of the official price.