Use LobeHub (LobeChat) with TokenMaster
LobeHub (formerly LobeChat) is an open-source chat workspace you can self-host or use online. Add TokenMaster as a custom AI provider.
You will need
- An API key starting with tm- (Console → API keys) — Get an API key
- Base URL:
https://tokenmaster.store/v1 - A model ID, e.g.
deepseek/deepseek-v4-pro(see the model list)
Setup
- Go to Settings → Provider → Add Custom Provider.
- Enter Provider ID
tokenmaster(lowercase; it cannot be changed later), Provider Name TokenMaster, and set Request Format to OpenAI. - Set Proxy URL to
https://tokenmaster.store/v1, paste yourtm-…key into API Key, then click Create. - On the provider page run Connectivity Check, then Fetch models (or Add Model with an ID) and enable the models you want.
- Recommended: keep Use Responses API Specification off. Chat Completions is TokenMaster's most complete protocol; the Responses API also works, but without OpenAI-hosted tools or stored responses.
Good to know
- Leave Use Client Request Mode off so requests go through your LobeHub server.
- The knowledge base uses the embedding model configured for your LobeHub deployment; if your setup lets you pick an OpenAI-compatible embedding model,
baai/bge-m3on TokenMaster works. - Not available through TokenMaster: image generation, speech, rerank, the Assistants API, and OpenAI-hosted tools. Chat Completions, the Responses API (stateless), the Anthropic Messages API and embeddings are available.
Checked against LobeHub (LobeChat) 2.2 on 2026-10-19. Menu names can change between versions.
Troubleshooting
- 401 / invalid API key — check the key was copied in full and has not been deleted in the console.
- 404 — the base URL is wrong. It must end in /v1 unless the guide says otherwise.
- Model not found / not available — use the exact ID from the model list (vendor/model, lowercase). Some vendors are not available in every region.
- Errors mentioning /responses — the tool is using OpenAI's Responses API. TokenMaster accepts it, but statelessly (no previous_response_id) and without OpenAI-hosted tools; if the tool relies on those, switch it to Chat Completions as noted above.
- 402 / insufficient balance — top up in the console; requests are refused rather than run up a debt.