https://api.tokios.com/v1 with your sk-tok-… key, and LobeChat chats with a model on your own hardware instead of the default hosted API.
Prerequisites
Connector paired
Install and pair
tokios-connector next to the model you want LobeChat to reach.Model registered
Register a deployment (public name) for that model.
API key created
Create an
sk-tok-… key, optionally scoped to that deployment.Supported backends
Confirm your local backend (Ollama, llama.cpp, vLLM, LM Studio) is running.
Option A — configure it in the app
1
Open the OpenAI provider settings
In LobeChat, go to Settings → Language Model → OpenAI. Enable the provider.
2
Set the API key and proxy address
Enter your key and point the proxy address at Tokios:The API Proxy Address is LobeChat’s base-URL override — include
/v1.3
Add your deployment as a model
Add a model using the public deployment name you registered in the Models tab — for example,
gemma-tunnel. This is the value LobeChat sends in the model field, not your backend’s local model id.Option B — configure it with environment variables
If you self-host LobeChat (for example with Docker), set these environment variables instead of using the in-app fields:.env
OPENAI_PROXY_URL overrides the base URL (include /v1), and OPENAI_MODEL_LIST=+gemma-tunnel adds your deployment to the model picker. The exact variable names can shift between LobeChat releases — confirm them against the self-hosting model-provider docs for your version.
Hosted UI, home model
Run LobeChat wherever it’s convenient — a browser, a VPS, or a container — and it still reaches a model on your home machine. The connector next to that model dials outward to Tokios; LobeChat callshttps://api.tokios.com/v1 with your key. You don’t bind your backend to 0.0.0.0, open an inbound port, or set up a VPN.
Troubleshooting
401 error
401 error
The API key LobeChat sent is missing, malformed, or has been revoked. Confirm the key (in-app or in
OPENAI_API_KEY) is the full sk-tok-… value with no extra whitespace, and check its status on the Keys tab.404 error
404 error
The model value doesn’t match a registered deployment, or the proxy address is missing
/v1. Confirm the model name matches the public name on the Models tab, and that the address is https://api.tokios.com/v1.503 error
503 error
The connector for that deployment is offline or at its concurrency cap. Check the Connectors tab — the connector needs to show as Online, and the machine running it needs to still be up and reachable.
Next steps
Compatible clients
See base URL and key setup for other OpenAI- and Anthropic-compatible clients.
API keys
Create separate scoped keys for teammates using the same LobeChat instance.