Providers
Providers are added in the Model Providers section of the AI settings, with Add Model Provider. Each one lists the models selected for it, which are the ones the chat offers; a provider with no models selected is not offered in the chat.
Cloud providers using API keys
Currently, the following cloud providers are supported:
- Anthropic
- OpenAI
- Gemini
- DeepSeek
- OpenRouter
For all the providers, an API key is needed. Note that this is charged separately from the subscription you might already have (e.g. Claude Pro). If that might be a problem, consider using either a subscription provider (see below) or using it externally via MCP.
Do note that most other LLM providers (e.g. Groq, Mistral, Together) can still be used in Trilium via the OpenAI-compatible custom endpoint (see below).
If you are using a proxy or gateway, you can also configure the base URL, otherwise the default will be used.
For OpenRouter, the models are billed to your OpenRouter credits, and their prices, context windows and the attachments they read come from OpenRouter's own model list:
- The Latest models that can use tools are selected by default, such as Anthropic: Claude Sonnet Latest. OpenRouter points each of them at the newest model of its line, so the selection stays current without editing the provider.
- Models that reason have a reasoning effort dropdown in the chat (Low, Medium or High).
- Auto Router (
openrouter/auto) picks a model for each message. Below each reply, the chat names the model that wrote it, which is also the case when a Latest model was used. - The cost shown below a reply is what OpenRouter billed for it, rather than an estimate from the listed prices.
- Image generation models and the deferred batch variants are not listed.
- Chat titles are generated with Anthropic: Claude Haiku Latest.
- Requests are attributed to Trilium on your OpenRouter activity page.
For Gemini, a chat that doesn't specify a model uses gemini-3.8-flash, and the automatically generated chat titles use gemini-3.5-flash-lite. A model you select explicitly is used as is and isn't affected by these defaults.
Subscription-based providers
Trilium integrates multiple Subscription-based providers:
- Claude Code by reusing your CLI.
- GitHub Copilot by reusing your CLI's ACP.
- Google Antigravity by downloading and setting up an ACP for Trilium.
- OpenAI Codex by reusing your CLI through an ACP adapter shipped with Trilium.
Local/self-hosted providers
Local or self-hosted providers are a free alternative which respects your privacy but requires specific hardware.
Trilium directly supports the following local providers:
Ollama
Generally Ollama runs in the background so it should be directly usable in Trilium as long as the models are downloaded (e.g. ollama pull llama3.2).
LM Studio
The OpenAI-compatible server is disabled by default in LM Studio installations. First download your desired models through the graphical interface, then go to Settings → Developer and toggle Developer mode. On the left there will be a new Developer tab, with a toggle to start it up.
Even for local providers that are not directly supported by Trilium, you can still use a custom endpoint (see below).
Custom endpoints
If your desired hosted (e.g. Groq, Mistral, Together) or local LLM provider is not listed in Trilium, you can use the dedicated OpenAI-compatible provider from the Custom endpoint section.
This allows you to set the base URL to an OpenAI-compatible API, with an optional API key if required by the service.
Enter the base URL exactly as the service documents it, including its version path, such as https://api.groq.com/openai/v1 or https://open.bigmodel.cn/api/paas/v4. Only a bare host such as http://localhost:8080 is completed with /v1.
The endpoint can run on the same machine as Trilium, elsewhere on your local network or on a Tailscale tailnet. Trilium refuses link-local addresses (169.254.0.0/16) and cloud metadata endpoints, which no model server is served on.
For custom endpoints, the pricing of the models is not known so the cost of a conversation will not be displayed; this is especially relevant for hosted providers.