Connect a model
Until you connect an AI, Kernl's chat and agents stay off. Everything else works. You connect a model in the dashboard, and you can connect several so one covers for another.
Open the AI settings
In the bar on the left, click System. Then click Settings in the tabs at the top, and AI in the settings list. You can also go straight to http://localhost:3086/settings?section=ai.

The page is called Connect your AI. Click + Connect provider to see every provider, or Connect NVIDIA for free to go straight to the recommended one.

Pick a provider
Providers are grouped by what they cost and where they run. If you don't know which one to choose, start with NVIDIA: it is free and needs no card.
Cerebras, Mistral, Together AI, Fireworks AI, Kimi, Qwen, Z.ai, Xiaomi MiMo and the OpenAI-compatible server arrive in the next Kernl release. If you don't see them, update Kernl.
| Provider | Group | What it costs | Where you get the key | The key starts with |
|---|---|---|---|---|
| NVIDIA ★ | Free | free, no card | build.nvidia.com | nvapi- |
| Google Gemini | Free | free, Google uses your data | aistudio.google.com/apikey | AIza or AQ. |
| Groq | Free | free, small limits | console.groq.com/keys | gsk_ |
| OpenRouter | Free | free, 50 requests a day | openrouter.ai/settings/keys | sk-or- |
| Cerebras | Free | free trial, small limits | cloud.cerebras.ai | — |
| Mistral | Free | free, no card | console.mistral.ai | — |
| Ollama | On your computer | free, runs on your machine | no key | — |
| LM Studio | On your computer | free, runs on your machine | no key | — |
| OpenAI-compatible server | On your computer | free, your own server | optional | — |
| Anthropic | Pay as you go | your API credit | platform.claude.com | sk-ant- |
| OpenAI | Pay as you go | your API credit | platform.openai.com/api-keys | sk- |
| DeepSeek | Pay as you go | your API credit, cheap | platform.deepseek.com/api_keys | sk- |
| xAI Grok | Pay as you go | your API credit | console.x.ai | xai- |
| MiniMax | Pay as you go | your API credit, cheap | platform.minimax.io | — |
| Together AI | Pay as you go | your API credit, from USD 15 | api.together.ai | — |
| Fireworks AI | Pay as you go | your API credit, trial credits | app.fireworks.ai | — |
| Moonshot (Kimi) | Pay as you go | your API credit, from USD 1 | platform.kimi.ai | — |
| Qwen (Alibaba Cloud) | Pay as you go | free quota, then your credit | Alibaba Cloud Model Studio | sk- |
| Z.ai (GLM) | Pay as you go | your API credit, some free models | z.ai | — |
| Xiaomi MiMo | Pay as you go | your API credit, cheap | platform.xiaomimimo.com | sk- |
| Claude Code | With your subscription | your Claude Pro or Max plan | no key | — |
Connect with an API key
Every provider in the Free and Pay as you go rows works the same way:
- Click the provider's card. The form shows three steps to get a key, with a link to the provider's site next to the first one.
- Create the key on that site and copy it.
- Paste it into API key.
- Leave the Model that comes selected, or pick another. The list marks one as "recommended" and one as "fast". You can also type any model id the provider offers.
- Click Connect.

Kernl tests the connection before it saves anything: it asks the model to use a tool, because Kernl's agents need that. When it works you see "Connected · uses tools · answered in … ms" and the provider appears under Your connections.
If the key doesn't look like that provider's key, Kernl warns you: "This key doesn't look like a … key". It still lets you try, so if you copied it whole, click Connect anyway.
Once connected, you can click Load more models in the form to see every model the provider has for you.
NVIDIA
Free and with no card. It is the recommended first choice. NVIDIA does not publish its usage limits.
- Create your free account at build.nvidia.com.
- Open any model and click Get API Key.
- Copy the key (it starts with
nvapi-) and paste it in Kernl.
Google Gemini
Free. On the free plan, Google uses what you send to improve its products. Don't use it for anything private.
- Open Google AI Studio (aistudio.google.com/apikey) with your Google account.
- Click Create API key.
- Copy the key and paste it in Kernl.
Groq
Free, but with small limits: 8,000 tokens per minute. Agents with many tools can go over it, so Groq works best as a backup.
- Create your account at console.groq.com.
- Open API Keys and click Create API Key.
- Copy the key (it starts with
gsk_) and paste it in Kernl.
OpenRouter
Gives access to many models with one key. The free models allow 20 requests a minute and 50 a day, or 1,000 a day once you have bought USD 10 of credit.
- Create your account at openrouter.ai.
- Open Settings → Keys and click Create Key.
- Copy the key (it starts with
sk-or-) and paste it in Kernl.
Anthropic
Claude models through Anthropic's API, paid per use. This is separate from a Claude Pro or Max subscription. For that, see Claude Code.
- Open platform.claude.com and add credit.
- Open Settings → API keys and click Create key.
- Copy the key (it starts with
sk-ant-) and paste it in Kernl.
OpenAI
- Open platform.openai.com.
- Open API keys and click Create new secret key.
- Copy the key (it starts with
sk-) and paste it in Kernl.
DeepSeek
Pay per use, and cheap.
- Open platform.deepseek.com and add balance.
- Open API keys and create one.
- Copy the key and paste it in Kernl.
xAI Grok
- Open console.x.ai and add credit.
- Open API Keys and create one.
- Copy the key (it starts with
xai-) and paste it in Kernl.
MiniMax
Pay per use, and cheap. MiniMax keys have no fixed prefix, so Kernl never warns about their format.
- Open platform.minimax.io.
- Open User Center → Interface key and create one.
- Copy the key and paste it in Kernl.
- Under Region, choose Global, or China if your account is on minimax.cn.
Cerebras
Very fast. The free trial allows 5 requests a minute and 1 million tokens a day per model, enough for a backup but tight for heavy agents.
- Create your account at cloud.cerebras.ai.
- Open API Keys in the left bar and create one.
- Copy the key and paste it in Kernl.
Mistral
The free mode needs no card, but Mistral may ask for a phone number. Mistral may use what you send on the free mode to train its models, so don't use it for anything private.
- Create your account at console.mistral.ai.
- Open API Keys and click Create new key. Give it a name and an expiration.
- Copy the key and paste it in Kernl. Mistral shows it only once.
Together AI
Hundreds of open models, such as GLM, Kimi and gpt-oss, with one key. There is no free trial: the first purchase is at least USD 15.
- Create your account at together.ai and add credit.
- Open Settings → API Keys and click Create key.
- Copy the key and paste it in Kernl. Together shows it only once.
Model ids carry the owner in front, for example zai-org/GLM-5.3.
Fireworks AI
Fast, cheap open models. Without a payment method you get trial credits and 10 requests a minute.
- Create your account at fireworks.ai.
- Open Settings → API Keys and click Create API key.
- Copy the key and paste it in Kernl.
Model ids are long paths, for example accounts/fireworks/models/glm-5p3.
Moonshot (Kimi)
Kimi models, strong at agents and code. You top up from USD 1, and the first level allows 3 requests a minute.
- Open platform.kimi.ai and add credit.
- Open API Keys and create one.
- Copy the key and paste it in Kernl.
- Under Region, choose International, or China if your account is on platform.kimi.com.
Kernl picks kimi-k2.6. You can choose kimi-k3 under Model, but it always reasons first, so check that your agents work with it.
Qwen (Alibaba Cloud)
In the Singapore region you get 1 million free tokens per model for 90 days. After that you pay per use.
- Open Alibaba Cloud Model Studio and choose the region at the top right.
- Open API Key and click Create API Key. Leave the default workspace and give it all permissions.
- Copy the key (it starts with
sk-) and paste it in Kernl. It is shown only once. - Under Region, choose the same region you created the key in: International (Singapore) or China (Beijing). A key from another region is rejected.
Z.ai (GLM)
GLM models, good at agents. The GLM-4.7-Flash and GLM-4.5-Flash models are free; the rest are paid per use.
- Create your account at z.ai.
- Open the API keys page and create one.
- Copy the key and paste it in Kernl.
- Under Region, choose International, or China if your account is on bigmodel.cn.
Xiaomi MiMo
Xiaomi's MiMo models: cheap, with room for a million tokens of context. Kernl uses MiMo-V2.6-Pro, and MiMo-V2.6-Flash as the fast model.
- Create your account at platform.xiaomimimo.com and add credit.
- Open API Keys and create one.
- Copy the key (it starts with
sk-) and paste it in Kernl.
MiMo also sells a Token Plan, a monthly plan whose keys start with tp-. Those keys don't work here: use a pay-as-you-go key.
Use a local model
Ollama, LM Studio and any OpenAI-compatible server run on your own machine or network. They need no key, and nothing you send leaves your computer.
For Ollama: install it from ollama.com, download a model with the command below, and leave Ollama running.
ollama pull qwen3
For LM Studio: install it from lmstudio.ai, download and load a model, then in Developer turn on Start server.
Back in Kernl:
- Pick Ollama or LM Studio under On your computer.
- Click Detect. Kernl looks at the usual address and shows "Found at … · N models" when it finds your server.
- Choose one of your models under Model.
- Click Connect.

The Server address comes filled in: http://localhost:11434/v1 for Ollama and http://127.0.0.1:1234/v1 for LM Studio. Change it only if you run them on another port or another computer.
If you run Kernl in Docker, Detect also tries host.docker.internal, which reaches your computer from inside the container. If it still can't find your server, write the address by hand, for example http://host.docker.internal:11434/v1 for Ollama.
The model must be able to use tools. If it answers but doesn't use them, Kernl says so and the agents will not work with it. Pick another model.
Any OpenAI-compatible server
Use this card for llama.cpp, vLLM, Jan, LocalAI, or a proxy such as LiteLLM: any server that answers the OpenAI API.
- Start your server with its OpenAI-compatible API.
- Under On your computer, pick OpenAI-compatible server.
- Click Detect, or write the address yourself in Server address. It usually ends in
/v1. - If your server asks for a key, paste it in API key (optional).
- Choose a model and click Connect.
Detect looks on ports 8080 (llama.cpp and LocalAI), 8000 (vLLM) and 1337 (Jan), on your computer and, with Docker, on host.docker.internal. A server on another computer or port has to be written by hand, for example http://192.168.0.20:8000/v1.
Use your Claude Code subscription
You can let Kernl use your Claude Pro or Max subscription as its AI. This is the opposite of connecting Claude Code to Kernl, where Claude Code uses Kernl's tools. The two are unrelated and you can do both.
If you installed the Kernl app or package (not Docker):
- Under With your subscription, pick Claude Code.
- Click Connect with my subscription. A Claude approval page opens in your browser.
- Approve it. Kernl connects by itself.
If Kernl runs in Docker
In Docker there is one more step. When you approve, Claude sends your browser back to an address that only exists inside the container, so your browser can't open it. You have to copy that address and paste it in Kernl yourself.

- Under With your subscription, pick Claude Code and click Connect with my subscription. Claude's approval page opens in a new tab. If your browser blocks the new tab, click Open the approval page.
- On Claude's page, sign in with your Claude account if it asks, and approve.
- Your browser now shows an error page: "This site can't be reached" or similar. That is expected. Don't close it.
- Click the address bar of that tab and copy the whole address. It starts with
http://localhostand has/callback?code=and&state=in it. For example:http://localhost:…/callback?code=…&state=… - Go back to the Kernl tab. Paste the address in Address of the page that didn't load.
- Click Connect. Claude Code shows up under Your connections.
Copy the address exactly as it is, from the first h to the end. A part of it is not enough.
If something goes wrong:
| Message | What to do |
|---|---|
| That doesn't look like the address: it must include ?code= and &state=. | You copied only part of it. Copy the whole address from the address bar again. |
| That address belongs to another attempt. | You pasted the address from an older try. Click Open the approval page again, approve, and paste the new address. |
| This sign-in is no longer running. Start again. | The attempt expired, or you closed the form. Click Connect with my subscription again. |
| The approval page expired. Try again. | More than 10 minutes went by. Start again with Connect with my subscription. |
| Kernl could not hand the approval to Claude Code. Try again. | Start again. If it keeps failing, sign in from a terminal. |
Sign in from a terminal
If the button doesn't work, with Docker or without it, click Or sign in from a terminal:
- Click Copy command and paste the command in a terminal. On Windows, use Command Prompt (cmd), not PowerShell.
- Claude Code opens. If it doesn't ask you to sign in, type
/loginand approve in the browser. - Leave Claude Code with
/exit, go back to Kernl and click Detect.
Use several providers
You can connect as many providers as you want. Each one you connect goes to the end of a list, and Kernl uses the first one that answers. If it fails, because it is down, out of credit or too slow, Kernl moves on to the next one by itself.
The line at the top of Your connections shows the order: "Kernl thinks with … → if it fails: …".
- To change the order, click Reorder, move providers with the arrows, and click Save. The button shows up once you have two or more.
- To change a provider's model, click Edit on its row, pick another Model and click Connect. You don't need to paste the key again.
- To check that it still works, click Test. The row shows when it was last tested and how fast it answered.
- To remove it, click Remove and confirm. Kernl deletes its key and takes it out of the list.
A good setup: NVIDIA first, with Groq or a local model as a backup.
When the connection fails
Kernl explains the problem and offers a button to fix it. Click Show details to see the provider's own message.

| Message | What to do |
|---|---|
| The key is not valid or was revoked. | Click Get a new key and paste the new one. |
| You reached the free limit or ran out of credit. | Wait, add credit, or click Add a backup provider. |
| That model is no longer available. | Click Choose another model. |
| The model is busy and did not answer in time. | Click Use the fast model, or try again later. |
| It answers, but does not use tools: agents will not work. | Click Choose another model. |
| Can't find Ollama (or LM Studio) at … | Check that it is running, then click Detect again. |
| There is no Claude Code session on this machine. | Sign in with Copy command, as in Claude Code. |
| No connection to … | Check your internet connection and click Try again. |
Keys in the .env file
Kernl keeps keys encrypted in its database, not in files. If you had a key in .env (for example NVIDIA_API_KEY or OPENAI_API_KEY) the first time Kernl started, it imported it, connected that provider, and removed the line from .env. It also left a copy of the file named .env.bak-….
After that first start, Kernl ignores keys added to .env. Connect new providers in Settings → AI.
Next step
To use Kernl's tools from another app, read MCP basics.