Error 401 / Invalid API key

401 means the app sends the key somewhere else or the key is incomplete. Check:

  1. the whole kl_live_… key is pasted, no spaces or quotes;
  2. the address is https://api.klinch.cloud/v1 (Claude Code and Cline with the Anthropic provider: https://api.klinch.cloud without /v1), not api.openai.com, api.anthropic.com or openrouter;
  3. in Claude Code the key goes into ANTHROPIC_AUTH_TOKEN; remove an old ANTHROPIC_API_KEY;
  4. in OpenCode, Cursor and similar apps don't pick a built-in provider (Anthropic, OpenRouter, Gemini etc.): the key then goes to that company's server and it answers «Authentication Fails», «Please pass a valid API key» or «Missing Authentication header». Add a custom (OpenAI-compatible) provider with https://api.klinch.cloud/v1. «Authentication Fails … is invalid» comes from DeepSeek's server: in Chatbox set the DeepSeek provider's API host to https://api.klinch.cloud/v1;
  5. in Codex (CLI and app) an error mentioning api.openai.com means no own provider is set: add a klinch provider with base_url = "https://api.klinch.cloud/v1"; (with /v1) to ~/.codex/config.toml, then restart Codex. Ready settings: https://klinch.cloud/console → «API».

To check the key itself, sign in with it at https://klinch.cloud/console

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.