Docs menu
OpenRouter, Ollama and other OpenAI-compatible endpoints
Use any service with an OpenAI-compatible API, such as OpenRouter, Mistral, Groq or your own Ollama server. Base URLs, model names, keys and which addresses are allowed.
Besides Anthropic and OpenAI, Nearlysent works with any service that offers an OpenAI-compatible API: the same /chat/completions and /models endpoints. That includes routers like OpenRouter, other providers like Mistral and Groq, and a model on your own server with Ollama.
Set it up
- In your workspace, go to Settings → General → AI provider (Admin or Owner role).
- Provider: choose OpenAI-compatible.
- Base URL: the address of the API, usually ending in
/v1(see the table below). It must start withhttp://orhttps://. - API key: the key from your provider. For a server without keys (a local Ollama), enter any text.
- Click Validate & save. The app asks the server for its list of models; if that works, the key is saved.
- In the Models card, choose a Triage model and a Draft model from the server’s list. There are no recommended models for this provider, so you pick them yourself. The draft model can also be “Same as the triage model”.
| Service | Base URL | Model names look like |
|---|---|---|
| OpenRouter | https://openrouter.ai/api/v1 |
vendor/model, e.g. anthropic/… or meta-llama/… |
| Mistral | https://api.mistral.ai/v1 |
mistral-small-latest, mistral-large-latest |
| Groq | https://api.groq.com/openai/v1 |
as listed in the Groq console |
| Ollama on the same machine | http://localhost:11434/v1 |
the models you pulled, e.g. llama3.1:8b |
Check your provider’s documentation for the current base URL and model names. The list in the Models card always shows what your server really offers.
Choosing models
- The triage model only sorts mail and writes a one-line summary. A small, fast model is fine.
- The draft model writes the replies and must follow instructions well: cite its sources and say so when the knowledge does not cover a question. Use the strongest model you can afford. Very small local models often ignore these rules; try the Playground and the Live preview under Settings → AI behaviour before you rely on it.
- The model must be able to return JSON. Most current chat models can.
Costs
Nearlysent only knows the prices of the Anthropic and OpenAI models it lists. For other models the Usage card and the Dashboard show tokens, and the cost as Unknown. Check the cost in your provider’s own dashboard. A model on your own hardware costs nothing per email.
Local models and private addresses
On the public service, the base URL must point at a public internet address. Addresses like localhost, 127.0.0.1, 10.x.x.x, 192.168.x.x and other private or internal ranges are refused with “This base URL is not valid or not allowed.” This protects the server and its network: otherwise anyone could make it call internal services. Redirects are never followed, and the address is checked again on every request.
To use your own Ollama with the public service, it must be reachable on a public address with HTTPS, for example behind a reverse proxy, preferably with an API key in front of it.
On a dedicated installation of Nearlysent for your company, private addresses can be allowed, so an Ollama server in your own network works without a public address. That is available as a custom service; see Your own server.
What the provider receives
Whichever provider you choose, it receives the email text, the matching passages from your knowledge and your AI behaviour settings, because it needs them to write a draft. Choose a provider whose privacy terms fit your customers’ data. More in Security & privacy.
Something unclear or missing in the docs?Tell us.