> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gleap.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Local models

> Run Kai Code turns on your own hardware with Ollama or any OpenAI-compatible endpoint.

Besides the hosted models and your own coding-agent subscriptions through [Kai Code Bridge](/documentation/guides/kai-code-bridge), Kai Code can run on models you host yourself. Local models are configured under **Kai Code → Settings → Local LLM** and appear in the composer's model picker with a **Local** label. Turns on a local model run on your machine and are **not billed by Gleap**.

<Note>
  Local models are available in the **Gleap Desktop** app only, and need the *Kai Code local* permission. In the browser the tab explains where to get the app.
</Note>

## Ollama

Models from a local [Ollama](https://ollama.com) install (default `http://127.0.0.1:11434`). Pull a model on the machine and open the tab — Kai detects installed models automatically, or use **Detect**. Added models become selectable in Kai Code's local runtime.

Pick a model that **supports tool calls** and fits your memory. Coding sessions rely heavily on tools (reading files, running commands), so a model without tool support cannot complete a task.

## Custom OpenAI-compatible endpoints

Any server that speaks the OpenAI chat-completions API: llama.cpp, LM Studio, vLLM, or a box on your LAN. Choose **Add endpoint** and enter:

* **Label** — the slug shown in the model picker. Models appear as `<label>/<model>`.
* **Base URL** — the OpenAI-compatible root of the server, including `/v1`.
* **API key** — optional; leave empty for local servers.
* **Model id** and **Context window** for each model the endpoint serves.
