TBL supports multiple LLM providers. This guide explains how to set up each one.
Runs models locally on your machine.
- Install from ollama.com
- Download a model:
ollama pull qwen3:14b - Select "Ollama" in TBL
| VRAM | Model | Size |
|---|---|---|
| 6-10 GB | qwen3:8b |
5.2 GB |
| 10-16 GB | qwen3:14b |
9.3 GB |
| 16-24 GB | qwen3:30b-instruct |
19 GB |
| 48+ GB | qwen3:235b |
142 GB |
Browse models: ollama.com/search
python translate.py -i book.txt -o book_fr.txt -m qwen3:14bTBL supports any server that implements the OpenAI API format. This includes:
- llama.cpp (
llama-server) - Lightweight, direct model serving - LM Studio - Desktop app with GUI
- vLLM - High-performance serving
- LocalAI - Drop-in OpenAI replacement
- Text Generation Inference - HuggingFace's serving solution
- Start your OpenAI-compatible server
- In TBL:
- Select "OpenAI-Compatible" provider
- Set endpoint to your server URL (see table below)
- Leave API key empty (local servers don't require it)
| Server | Default Endpoint |
|---|---|
llama.cpp (llama-server) |
http://localhost:8080/v1/chat/completions |
| LM Studio | http://localhost:1234/v1/chat/completions |
| vLLM | http://localhost:8000/v1/chat/completions |
| LocalAI | http://localhost:8080/v1/chat/completions |
# llama.cpp (llama-server)
python translate.py -i book.txt -o book_fr.txt \
--provider openai \
--api_endpoint http://localhost:8080/v1/chat/completions \
-m your-model-name
# LM Studio
python translate.py -i book.txt -o book_fr.txt \
--provider openai \
--api_endpoint http://localhost:1234/v1/chat/completions \
-m your-model-nameAccess to 200+ models from multiple providers through a single API.
- Get API key at openrouter.ai/keys
- In TBL: Select "OpenRouter", enter your key
- Choose a model from the list
python translate.py -i book.txt -o book_fr.txt \
--provider openrouter \
--openrouter_api_key sk-or-v1-your-key \
-m anthropic/claude-sonnet-4Browse models and pricing: openrouter.ai/models
Official OpenAI API (GPT models). Uses the same "OpenAI-Compatible" provider in TBL.
gpt-4o- Latest GPT-4gpt-4o-mini- Smaller, cheapergpt-4-turbogpt-3.5-turbo
- Get API key at platform.openai.com
- In TBL:
- Select "OpenAI-Compatible" provider
- Keep endpoint as
https://api.openai.com/v1/chat/completions - Enter your API key
python translate.py -i book.txt -o book_fr.txt \
--provider openai \
--openai_api_key sk-your-key \
-m gpt-4oPricing: openai.com/pricing
Google's Gemini models.
gemini-2.0-flashgemini-1.5-progemini-1.5-flash
- Get API key at Google AI Studio
- In TBL: Select "Gemini", enter your key
python translate.py -i book.txt -o book_fr.txt \
--provider gemini \
--gemini_api_key your-key \
-m gemini-2.0-flashEuropean cloud provider with strong multilingual quality.
mistral-large-latest— flagshipmistral-small-latest— cheaper, fastopen-mistral-nemocodestral-latest
- Get API key at console.mistral.ai/api-keys
- In TBL: Select "Mistral", enter your key
python translate.py -i book.txt -o book_fr.txt \
--provider mistral \
--mistral_api_key your-key \
-m mistral-large-latestPricing: mistral.ai/technology
Chinese LLM provider with 64K context and OpenAI-compatible API. Supports thinking models.
deepseek-v4-pro— high-quality modeldeepseek-v4-flash— faster economical modeldeepseek-chat— legacy alias scheduled for deprecation on 2026-07-24deepseek-reasoner— reasoning model with<think>blocks
- Get API key at platform.deepseek.com/api_keys
- In TBL: Select "DeepSeek", enter your key
python translate.py -i book.txt -o book_fr.txt \
--provider deepseek \
--deepseek_api_key your-key \
-m deepseek-v4-proPricing: api-docs.deepseek.com/quick_start/pricing
Single key, many models — Claude, GPT, Gemini, Llama, Mistral, DeepSeek and more from one Poe account.
- Get API key at poe.com/api_key
- In TBL: Select "Poe", enter your key
- Pick a model name from poe.com (case-sensitive, e.g.
Claude-Sonnet-4)
python translate.py -i book.txt -o book_fr.txt \
--provider poe \
--poe_api_key your-key \
-m Claude-Sonnet-4Poe usage is metered in points — each model has its own cost. Check the model card on poe.com for the rate.
Poe bots ship with two defaults that cost tokens translation never uses, so TBL overrides both.
Reasoning. Most bots reason by default (gemini-3.6-flash: thinking_level=medium, grok-4.5
and kimi-k3: reasoning_effort=high, glm-5.x: enable_thinking=true). On a 102-token prompt,
gemini-3.6-flash spent 1167 reasoning tokens out of 1231 output tokens. TBL asks each bot for its
lowest reasoning setting; POE_DISABLE_THINKING=false keeps reasoning on.
Web search. gemini-3.6-flash and grok-4.5 search the web by default, and every chunk pays for
it in prompt tokens: grok-4.5 sent 1141 prompt tokens for an 84-token translation prompt, down to
283 with search off. A book is self-contained, so retrieval is cost at best and context pollution at
worst. POE_DISABLE_WEB_SEARCH=false allows it.
Poe has no universal switch for either: every bot advertises its own knobs in the parameters array
of /v1/models and rejects any knob it does not advertise with HTTP 400, so the settings are read
from that catalog rather than a hardcoded model list. A rejected knob is dropped and the request
retried, so a stale catalog entry can never fail a chunk.
One exception: output_effort (Claude 4.6/4.8) is left untouched, because it caps the whole answer
rather than just hidden reasoning. Those two bots keep reasoning.
Hosted models via NVIDIA's inference platform — OpenAI-compatible API, generous free tier.
- Get API key at build.nvidia.com
- In TBL: Select "NVIDIA NIM", enter your key
python translate.py -i book.txt -o book_fr.txt \
--provider nim \
--nim_api_key your-key \
-m meta/llama-3.1-8b-instructBrowse models: build.nvidia.com
The web API lets a request choose the endpoint the server calls, so the server checks that endpoint against an allowlist before using it. Accepted out of the box:
- the known provider hosts (
api.openai.com,generativelanguage.googleapis.com,openrouter.ai,api.mistral.ai,api.deepseek.com,api.poe.com,integrate.api.nvidia.com); - every
*_API_ENDPOINTconfigured in your.env; - anything on your own network, so self-hosted Ollama, LM Studio, llama.cpp and vLLM keep working: loopback and LAN addresses (including
100.64.0.0/10, the range Tailscale uses),localhost,host.docker.internal, a single-label hostname such ashttp://ollama:11434(a Docker service or LXC name), and any host under.local,.lan,.home,.home.arpa,.internal,.intranet,.corp,.privateor.ts.net; - any other hostname that resolves entirely to your local network, so a LAN machine named under a domain you own (
ai-server.example.comanswering192.168.1.50from your internal DNS) works without any configuration. The lookup only happens for a host none of the rules above accepted, and the verdict is cached for a minute.
Anything else returns HTTP 400 with the rejected host and the fix in the response, and a WARNING line in the server log. A host that resolves to a public address, or does not resolve at all, is rejected.
The endpoint is only checked for the providers that actually read it (ollama, openai, nim). The web UI sends the field with every provider, so a stale value there never blocks a Gemini or OpenRouter job.
To allow a self-hosted gateway on a public hostname, add it to LLM_ENDPOINT_ALLOWLIST in .env (comma-separated; subdomains of a listed host are covered):
LLM_ENDPOINT_ALLOWLIST=llm.internal.example.com,gateway.example.orgThis variable is read at startup only and is deliberately not editable from the web UI. A second rule pairs with it: when a request supplies an endpoint that differs from the configured default, the server refuses to attach the API key stored in .env — that request must send its own key, or it is rejected. Together these guarantee a stored credential is never sent to a host the request chose.
Every cloud provider above accepts a comma-separated list of keys (e.g. key1,key2,key3). The system automatically rotates keys on HTTP 429 — useful for chaining free-tier accounts. See API_KEY_ROTATION.md for details.
Store settings in .env file:
# Provider
LLM_PROVIDER=ollama
# API Keys (each accepts comma-separated values for automatic rotation)
OPENROUTER_API_KEY=sk-or-v1-...
OPENAI_API_KEY=sk-...
GEMINI_API_KEY=...
MISTRAL_API_KEY=...
DEEPSEEK_API_KEY=...
POE_API_KEY=...
NIM_API_KEY=...
# Ollama settings
API_ENDPOINT=http://localhost:11434/api/generate
DEFAULT_MODEL=qwen3:14b