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:
- the file is in the .codex folder of your home folder (Windows: C:\Users\<name>\.codex\config.toml), not saved as config.toml.txt;
- it has model_provider = "klinch" and the [model_providers.klinch] block with base_url = "https://api.klinch.cloud/v1";
- start a new chat after the change.
Ready file with your key: https://klinch.cloud/console/connect?tool=codex
Full guide
Ready settings with your key
More questions
In the cabinet open «API» and pick your tool and system: the command already carries your key. Open the cabinet
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.