Kadhai is in beta. Found a bug, or something confusing? Report it; every report helps.
kadhai
Docs: Models and keys

docs / 06

Models and keys

Open keys in the taskbar. The providers you use come first, each with its keys (only ever shown masked) and its models.

click to enlarge
The keys dialog: subscriptions you already pay for, then every provider with its free tier.

Free providers

Gemini, Groq and Cerebras are the main free providers. Under More free providers you will find Mistral, OpenRouter, NVIDIA NIM, SambaNova, Hugging Face, Cohere and Z.ai. Things to know:

  • Several keys for the same provider are fine; each adds its own quota.
  • Free model line-ups change often. Browse models on a provider's card fetches what it offers right now; click to add or remove models. If a model is retired, Kadhai switches its route off and moves on.
  • Your prompts and code go to the providers you add keys for. Add only the ones you are comfortable sending your code to.
  • Most of the extra providers were checked to exist and to reject a wrong key, but have not been used with a real key yet. Groq has been used end to end.

Paste any key in the box at the top of keys. Keys that say whose they are (sk-ant- Claude, sk-proj- OpenAI, xai- xAI, gsk_ Groq, AIza Gemini, sk-or- OpenRouter) go to their provider by themselves.

  • Claude is spoken to natively. OpenAI, xAI and DeepSeek start with no models chosen; add the key, then Browse models.
  • Use paid models first (the default) or only when the free ones run out.
  • Daily limit (tokens) caps all paid models together. When it is reached they rest until tomorrow and the free ones carry on.
  • Kadhai cannot see prices or your balance; the limit is in tokens, not money. Check your provider's dashboard for what was charged.
  • To send only one agent to a paid model, set that agent's model under Edit agent.

Subscriptions you already pay for

If you use Claude Code, Codex CLI or Gemini CLI, install it, sign in to it once in a terminal (claude auth login, codex login, or run gemini), then switch it on under keys. Kadhai uses your plan's limits first and falls back to your API keys when they run out. On low flame the CLI only answers questions, with its own tools off, in an empty temporary folder; it never touches your project directly.

Using a subscription this way is subject to its vendor's terms, and those change. Each card in keys says what the vendor's terms said when this version of Kadhai was made, with a link to read them now. Google's terms for Gemini CLI warn against using it through other tools (Kadhai asks before switching it on); for Gemini, a free Gemini API key is the safe choice.

Your own server, or a model on this computer

Any server that speaks the OpenAI chat format (Ollama, LM Studio, a company gateway) can be added by name and address. An http://localhost address needs no key and is not counted as paid.

What happens when a model is busy

Each provider, key and model together is a route. When a route answers "too many requests", it rests until the provider says it may try again and the same request goes to the next route; a broken key or a retired model is switched off. You see this in the usage bar. Only when every route is out does the run stop, saying when the next slot opens. The files written so far are kept.

This page comes from the user guide in the repository. Something unclear or wrong? Tell us.

screenshot