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

# Ollama — run AI locally with Screenpipe

> Run open-source LLMs like Llama, Qwen, and Mistral locally with Ollama and Screenpipe — completely free, private, and offline with no API keys required.

[Ollama](https://ollama.com) lets you run AI models locally on your machine. Screenpipe integrates natively with Ollama — no API keys, no cloud, completely private.

## Setup

### 1. Install Ollama & pull a model

```bash theme={"system"}
# install from https://ollama.com then:
ollama run llama3.2
```

This downloads the model and starts Ollama. You can use any model — `llama3.2` is a good starting point (fast, works on most machines).

### 2. Select Ollama in Screenpipe

1. Open the **Screenpipe app**
2. Click the **AI preset selector** (top of the chat/timeline)
3. Click **Ollama**
4. Pick your model from the dropdown (Screenpipe auto-detects pulled models)
5. Start chatting

That's it. Screenpipe talks to Ollama on `localhost:11434` automatically.

## Recommended models

| Model | Size | Best for |
| - | - | - |
| `llama3.2` | \~2 GB | Fast, general use, recommended starting point |
| `gemma3:4b` | \~3 GB | Strong quality for size, good for summaries |
| `qwen3:4b` | \~3 GB | Multilingual, good reasoning |

Pull any model with:

```bash theme={"system"}
ollama pull <model-name>
```

## Requirements

* [Ollama](https://ollama.com) installed and running
* At least one model pulled
* Screenpipe running

## Custom OpenAI-compatible endpoints

If you're running a custom LLM server (Qwen, vLLM, Text Generation WebUI, etc.), Screenpipe auto-detects the endpoint format:

1. First tries OpenAI-compatible format: `GET {endpoint}/v1/models`
2. Falls back to Ollama format: `GET {endpoint}/api/tags`

**If your endpoint uses neither format**, you may need to:

* Check what path your server uses for model listing (`/models`, `/v1/list`, etc.)
* If unsure, test with curl first: `curl {your-endpoint}/path-to-models`
* Join our [Discord](https://discord.gg/screenpipe) — we can help troubleshoot custom setups

Example: a Qwen server on `http://localhost:5000` with OpenAI-compatible API should work automatically. If Screenpipe can't find models, verify the server responds to: `curl http://localhost:5000/v1/models`

## Troubleshooting

**"Ollama not detected"**

* Make sure Ollama is running: `ollama serve`
* Check it's responding: `curl http://localhost:11434/api/tags`

**Model not showing in dropdown?**

* Pull it first: `ollama pull llama3.2`
* You can also type the model name manually in the input field

**Slow responses?**

* Try a smaller model (`llama3.2`)
* Close other GPU-heavy apps
* Ensure you have enough free RAM (model size + \~2 GB overhead)

## Troubleshooting Azure & custom OpenAI endpoints

### Error: "unsupported tool use" or "does not support more than one tool call"

Screenpipe sends multiple tool calls to the LLM for agentic features. Some models (especially older Azure-hosted models like Phi-4, older Llama versions) don't support this.

**Fixes:**

* Use a model that supports tool use — most current frontier and mid-size open models do; check the model's documentation for tool/function-calling support
* Or disable agentic features in your scheduled task prompts (remove tool calls, just ask for text summaries)
* On Azure, try switching to the latest model version available

### Error: "max tokens is not supported"

Your endpoint doesn't recognize the `max_tokens` parameter that Screenpipe sends.

**Fixes:**

1. Verify your endpoint supports OpenAI-compatible API: `curl -H "Authorization: Bearer YOUR_KEY" https://your-endpoint/v1/models`
2. If using Azure, ensure you're using the OpenAI-compatible endpoint format (not the old REST API format)
3. Try a custom endpoint URL wrapper if your server needs parameter translation

### API key not being passed to Screenpipe API

If Screenpipe says "unauthorized" when accessing the local API, but your custom LLM endpoint is configured:

**Cause:** Screenpipe CLI doesn't automatically share API credentials with the local REST API server.

**Fix:** configure your scheduled task or app to use the API key explicitly:

```bash theme={"system"}
curl "http://localhost:3030/search?limit=5" \
  -H "Authorization: Bearer YOUR_SCREENPIPE_API_KEY"
```

Or set the API key in Screenpipe settings → API security → enable API key auth, then provide that key in your requests.

### Custom endpoint not responding / models not detected

Screenpipe tries both OpenAI and Ollama formats. If neither works:

1. **Test your endpoint manually:**
   ```bash theme={"system"}
   curl https://your-endpoint/v1/models
   curl https://your-endpoint/api/tags
   ```
   (one should return a model list; if neither does, your server may use a different path)

2. **Check authorization:**
   ```bash theme={"system"}
   curl -H "Authorization: Bearer YOUR_KEY" https://your-endpoint/v1/models
   ```

3. **Verify TLS/SSL:** if using https, ensure your certificate is valid (self-signed certs need special config)

4. **Common endpoint paths:**
   * OpenAI-compatible: `/v1/models`, `/v1/chat/completions`
   * Ollama-compatible: `/api/tags`, `/api/generate`
   * VLLM: `/v1/models` (OpenAI-compatible)
   * Text Generation WebUI: `/api/v1/models` (may vary)

If stuck, [join our Discord](https://discord.gg/screenpipe) — share your endpoint URL structure and error logs.

Need help? [join our Discord](https://discord.gg/screenpipe) — get recommendations on models and configs from the community.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.