Home / AI & Translation / Translation Providers

Translation Providers

Choose between local models (Ollama, LM Studio) and cloud APIs, and tune how translation works.

1. Available Providers

XianScan works with any OpenAI-compatible API. These providers are built in; the default is Ollama with qwen3.5:9b.

To change provider: Settings -> AI Translation Providers -> Switch Provider, enter the API Key (cloud only) and Model, click Test Connection, then Save & Set Active. Local providers (Ollama, LM Studio, or any localhost address) need no key.

When you change a cloud provider's Endpoint Base URL, enter the API key again in the same save. A saved key is never sent to a new address.

DeepSeek

DeepSeek

Cloud API
Low Cost
Default Base URL
https://api.deepseek.com
Google Gemini

Google AI Studio

Cloud API
Gemini 3.7
Default Base URL
https://generativelanguage.googleapis.com/v1beta/openai/
Groq

Groq

Cloud API
Fast
Default Base URL
https://api.groq.com/openai/v1
Ollama

Ollama

DEFAULT
Local • Runs Locally
Default: qwen3.5:9b
Default Base URL
http://localhost:11434/v1
LM Studio

LM Studio

Local • Runs Locally
Local Models
Default Base URL
http://localhost:1234/v1
OpenAI

OpenAI

Cloud API
GPT Models
Default Base URL
https://api.openai.com/v1
OpenRouter

OpenRouter

Universal Gateway
Many Models, One Key
Default Base URL
https://openrouter.ai/api/v1
Custom Endpoint

Custom

OpenAI-Compatible
Any Compatible API
Default Base URL
http://localhost:8000/v1

2. Setting Up Ollama

  1. Install Ollama. On Windows and macOS it runs in the background after installing; on a Linux server, start it with ollama serve.
  2. Download a model that fits your GPU:
bash
ollama pull qwen3.5:4b    # 4 to 6 GB of GPU memory, or CPU
ollama pull qwen3.5:9b    # 8 to 12 GB (XianScan's default)
ollama pull qwen3.5:27b   # 16 GB or more
  1. In XianScan, open Settings -> AI Translation Providers, choose Ollama (Local), and set the Model to the one you downloaded. The Endpoint Base URL is http://localhost:11434/v1.
  2. Click Test Connection.

No strong GPU? Ollama can also run models in Ollama's cloud with a free account. Run ollama signin, then ollama pull gemma4:cloud, and set the model to gemma4:cloud. Your pages are still processed locally; only the text is sent to Ollama's servers.

3. Dialogue Context

To keep names, pronouns and the flow of conversation consistent, XianScan sends the recent dialogue from previous pages along with each page. Empty pages are skipped, and at the start of a chapter it looks back into the previous chapter.

Set how many pages it looks back with Sliding Dialogue Context in Settings -> AI Translation Providers -> Inference & Sampling: Off, 1 to 6 pages, or Custom. The default is 4. More context helps consistency but makes each request longer and slower.

4. Reasoning, Output Length and Sampling

Also in Inference & Sampling:

  • Reasoning effort: for models that can "think" first (DeepSeek-R1, OpenAI o-series, Qwen with thinking). Choose None, Minimal, Low, Medium, High, Max or Auto, or type a custom value. For Ollama it simply turns thinking on or off. The model's thinking never ends up in the speech bubbles.
  • Max output tokens: default 4,096. XianScan raises it automatically for pages with a lot of text, and doubles it when it retries a page.
  • Temperature (default 0.2), Top-P, frequency and presence penalty: lower temperature gives more literal, consistent translations. Each can be switched off to use the provider's own default.