Add Your API Key¶
RagLeap uses your own AI API key — this keeps costs transparent and your data private.
Supported Providers¶
| Provider | Models | Get Key |
|---|---|---|
| Google Gemini | gemini-2.5-flash, gemini-1.5-flash | aistudio.google.com |
| OpenAI | gpt-4.1, gpt-4o-mini | platform.openai.com |
| Anthropic | claude-opus-4-6, claude-haiku | console.anthropic.com |
| Mistral | mistral-large, mistral-small | console.mistral.ai |
| OpenRouter | 100+ models | openrouter.ai |
| Custom / Ollama | Any OpenAI-compatible endpoint + local models | Your endpoint or localhost |
Setup Steps¶
- Go to Settings → AI Settings
- Enable Use Your Own API Key
- Select your provider
- Paste your API key
- Select your model
- Save
Embedding Key (Required)¶
A separate embedding key is needed for document uploads.
Recommended: Gemini embedding key (free)
- Go to aistudio.google.com
- Create a free API key
- Paste in Settings → AI Settings → Embedding Key
Recommended Models¶
| Use Case | Model | Why |
|---|---|---|
| Daily use | gemini-2.5-flash |
Free, fast, 1M TPM |
| Deep analysis | claude-opus-4-6 |
Best reasoning |
| Balanced | gpt-4o-mini |
Good performance, low cost |
Using Local AI Models (Ollama)¶
RagLeap works with any OpenAI-compatible API — including Ollama running on your own machine or server. This gives you 100% offline AI with zero API costs.
Step 1 — Install Ollama¶
Linux / Mac:
Windows: Download from ollama.com
Step 2 — Pull a model¶
ollama pull llama3.2 # 2GB — fast, good quality
ollama pull mistral # 4GB — excellent reasoning
ollama pull qwen2.5:7b # 4GB — great multilingual
ollama pull phi4-mini # 2GB — lightweight, fast
Step 3 — Start Ollama server¶
For remote access (self-hosted RagLeap on a different server):
Step 4 — Connect to RagLeap¶
- Go to Settings → AI Settings
- Select provider: Custom
- Fill in:
| Field | Value |
|---|---|
| API URL | http://localhost:11434/v1 |
| API Key | ollama (any string works) |
| Model | llama3.2 (or any pulled model) |
- Save — done!
Recommended Models by Use Case¶
| Use Case | Model | Size | Command |
|---|---|---|---|
| Fast responses | llama3.2 |
2GB | ollama pull llama3.2 |
| Best quality | mistral |
4GB | ollama pull mistral |
| Multilingual | qwen2.5:7b |
4GB | ollama pull qwen2.5:7b |
| Low RAM (2GB) | phi4-mini |
2GB | ollama pull phi4-mini |
| Code tasks | codellama |
4GB | ollama pull codellama |
Self-Hosted RagLeap + Ollama = Zero API costs
Running RagLeap Server Edition with Ollama means zero ongoing costs. Your data never leaves your server. Perfect for hospitals, banks, and law firms.
Embedding with Ollama
For document embeddings with Ollama:
- API URL: http://localhost:11434/v1
- Model: nomic-embed-text
- Run: ollama pull nomic-embed-text
Keep your key private
Never share your API key. RagLeap encrypts it at rest and never exposes it to customers.