aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-04-18 18:43:25 +0000
committerMohamed Bassem <me@mbassem.com>2025-04-18 18:48:42 +0000
commitbd5f85f5f8942079b22a88e1b320dfdccad2b1dc (patch)
tree7e603a42293d0f5e5b6b07ace6742b9bc93369df /docs
parent06284d28271ec4c188ac046c0795d456d424a60e (diff)
downloadkarakeep-bd5f85f5f8942079b22a88e1b320dfdccad2b1dc.tar.zst
docs: Add docs for how to configure differnt AI providers
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/14-Guides/05-different-ai-providers.md66
1 files changed, 66 insertions, 0 deletions
diff --git a/docs/docs/14-Guides/05-different-ai-providers.md b/docs/docs/14-Guides/05-different-ai-providers.md
new file mode 100644
index 00000000..33408c00
--- /dev/null
+++ b/docs/docs/14-Guides/05-different-ai-providers.md
@@ -0,0 +1,66 @@
+# Configuring different AI Providers
+
+Karakeep uses LLM providers for AI tagging and summarization. We support OpenAI-compatible providers and ollama. This guide will show you how to configure different providers.
+
+## OpenAI
+
+If you want to use OpenAI itself, you just need to pass in the OPENAI_API_KEY environment variable.
+
+```
+OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
+# You can change the default models by uncommenting the following lines, and choosing your model.
+# INFERENCE_TEXT_MODEL=gpt-4.1-mini
+# INFERENCE_IMAGE_MODEL=gpt-4o-mini
+```
+
+## Ollama
+
+Ollama is a local LLM provider that you can use to run your own LLM server. You'll need to pass ollama's address to karakeep and you need to ensure that it's accessible from within the karakeep container (e.g. no localhost addresses).
+
+```
+# MAKE SURE YOU DON'T HAVE OPENAI_API_KEY set, otherwise it takes precedence.
+
+OLLAMA_BASE_URL=http://ollama.mylab.com:11434
+
+# Make sure to pull the models in ollama first. Example models:
+INFERENCE_TEXT_MODEL=gemma3
+INFERENCE_IMAGE_MODEL=llava
+
+# If the model you're using doesn't support structured output, you also need:
+# INFERENCE_OUTPUT_SCHEMA=plain
+```
+
+## Gemini
+
+Gemini has an OpenAI-compatible API. You need to get an api key from Google AI Studio.
+
+```
+
+OPENAI_BASE_URL=https://generativelanguage.googleapis.com/v1beta
+OPENAI_API_KEY=YOUR_API_KEY
+
+# Example models:
+INFERENCE_TEXT_MODEL=gemini-2.0-flash
+INFERENCE_IMAGE_MODEL=gemini-2.0-flash
+```
+
+## OpenRouter
+
+```
+OPENAI_BASE_URL=https://openrouter.ai/api/v1
+OPENAI_API_KEY=YOUR_API_KEY
+
+# Example models:
+INFERENCE_TEXT_MODEL=meta-llama/llama-4-scout
+INFERENCE_IMAGE_MODEL=meta-llama/llama-4-scout
+```
+
+## Perplexity
+
+```
+OPENAI_BASE_URL: https://api.perplexity.ai
+OPENAI_API_KEY: Your Perplexity API Key
+INFERENCE_TEXT_MODEL: sonar-pro
+INFERENCE_IMAGE_MODEL: sonar-pro
+```