Codex: «Incorrect API key provided» from api.openai.com

That answer is from OpenAI itself: Codex sent the key to OpenAI because it does not see our config.toml. Check:

  1. the file is in the .codex folder of your home folder (Windows: C:\Users\<name>\.codex\config.toml), not saved as config.toml.txt;
  2. it has model_provider = "klinch" and the [model_providers.klinch] block with base_url = "https://api.klinch.cloud/v1";;
  3. start a new chat after the change.

Ready file with your key: https://klinch.cloud/console/connect?tool=codex

Full guide

Codex

Ready settings with your key

In the cabinet open «API» and pick your tool and system: the command already carries your key. Open the cabinet

More questions

One key and one balance for Claude, GPT, Gemini and more

Claude, GPT, Gemini, DeepSeek and Grok at a tenth of the official price. No subscription, pay as you go.