Open WebUI
Open WebUI is a fully-featured self-hosted AI chat interface with multi-user support, RAG, and function calling.
π‘ Open WebUI is multi-user by nature: before you deploy, decide whether everyone shares a single Tokensmart key or each user gets their own. The Tokensmart tips section below contrasts both patterns.
Install (Docker)
docker run -d \
-p 3000:8080 \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
Visit http://localhost:3000. First access prompts you to create an admin account.
Steps
- Login β avatar (top right) β Settings
- Left pane β Connections
- Under OpenAI API:
- API Base URL:
https://api.tokensmart.ai/v1 - API Key:
pk_live_xxxxxxxxxxxxxxxx
- API Base URL:
- Hit the refresh button next to Save to verify the connection
- Switch to Models and enable the models you want end users to see
Inject at container launch
docker run -d \
-p 3000:8080 \
-e OPENAI_API_BASE_URL=https://api.tokensmart.ai/v1 \
-e OPENAI_API_KEY=pk_live_xxxxxxxxxxxxxxxx \
-v open-webui:/app/backend/data \
--name open-webui \
ghcr.io/open-webui/open-webui:main
Tokensmart tips
- Pattern A: one team-wide key (simpler): inject a single Tokensmart key at container launch and let Open WebUI's own users share it. Give that key a team-level daily limit (e.g. $50/day) so one runaway user cannot exhaust the pool silently.
- Pattern B: per-user sub-keys: for a 5β10 person deployment, create one sub-key per person and let each user enter their own under Open WebUI's Connections (user-level config overrides admin). API Logs then breaks down spend per person automatically.
- Model admission control: whitelist models via the key's Allowed Models β a user trying to switch to a non-authorized model inside Open WebUI is blocked at the Tokensmart edge without affecting anyone else.
- Embedding / RAG caveat: Tokensmart currently focuses on chat-style models. If you enable Open WebUI's RAG, configure a separate embedding provider (e.g. local Ollama). Do not expect
/v1/embeddingsto resolve via Tokensmart.
Troubleshooting
- Empty model list β Open WebUI calls
/v1/models. Verify the key is still active, or add models manually under Admin Panel β Models - Multiple users sharing one key β every user's calls land on the same Tokensmart key. Create a dedicated key for Open WebUI to make accounting easier
- Embeddings / RAG β configure your embedding model under Admin Panel β Documents using the same Tokensmart Base URL