LobeChat (LobeHub) with Claude and GPT: custom provider, Docker env vars and the /v1 rule
Disclosure: I run APIVAI, the gateway used in the examples below. The setup is the same for any endpoint that speaks the OpenAI or Anthropic format. LobeChat is now called LobeHub : the GitHub repo lobehub/lobe-chat redirects to lobehub/lobehub , and the Docker image is lobehub/lobehub . It's an op

Disclosure: I run APIVAI, the gateway used in the examples below. The setup is the same for any endpoint that speaks the OpenAI or Anthropic format.
LobeChat is now called LobeHub: the GitHub repo lobehub/lobe-chat redirects to lobehub/lobehub, and the Docker image is lobehub/lobehub. It's an open-source chat and agent app that runs on the web, as a desktop app, or self-hosted, and every agent can use its own provider and model. This guide follows the LobeHub docs and UI labels as of October 2026: how to add a third-party API, where /v1 goes, and the usual pitfalls.
The /v1 rule: OpenAI-format URLs end in /v1; Anthropic-format URLs don't, because the Anthropic SDK appends /v1/messages itself.
Use Client Request Mode sends requests straight from the browser instead of through the LobeHub server. Leave it off unless you have a reason; if you turn it on and get network errors, turn it off again.
curl https://api.apivai.com/v1/models \ -H "Authorization: Bearer your-key" Enter fullscreen mode Exit fullscreen mode Alternative: the built-in Anthropic provider In AI Providers, select Anthropic and enable it. Paste the key into API Key and set API Proxy URL to https://api.apivai.com ( no /v1 ). Run Check, then enable Claude models. If a built-in model card has a different ID from the gateway's, add the correct one with Add Model; if Fetch models returns nothing here, add models by hand.
If you use the built-in OpenAI provider instead, set API Proxy URL to https://api.apivai.com/v1 and leave Use Responses API Specification off: LobeHub says it only supports OpenAI models, and you'll be sending Claude requests through it too.
A self-hosted LobeHub server reads providers from environment variables. Add these to your lobehub.env, next to the database and auth variables you already have:
# OpenAI format: Claude and GPT OPENAI_API_KEY = your-key OPENAI_PROXY_URL = https://api.apivai.com/v1 OPENAI_MODEL_LIST = -all,+claude-sonnet-4-6,+claude-haiku-4-5,+gpt-5.5 # Or Anthropic format: Claude only ANTHROPIC_API_KEY = your-key ANTHROPIC_PROXY_URL = https://api.apivai.com Enter fullscreen mode Exit fullscreen mode Start the container as usual, e.g. docker run -d -p 3210:3210 --env-file lobehub.env --name lobehub lobehub/lobehub, and restart it after every change to the file.
OPENAI_MODEL_LIST syntax: -all hides the default OpenAI models, +id adds a model, id=Display Name renames one. A key set here is a server key shared by every user of your instance, so give it its own budget limit. The LobeHub docs note that empty replies are often caused by OPENAI_PROXY_URL missing /v1; keep it there.
Chat works fully. Files and the knowledge base also need an embedding model to index documents, and APIVAI doesn't offer embeddings.
By default LobeHub creates embeddings with OpenAI's text-embedding-3-small through the OpenAI provider. If you point OPENAI_PROXY_URL at the gateway, file indexing fails, which is one more reason to chat through a custom provider. Configure embeddings separately with DEFAULT_FILES_CONFIG, e.g. DEFAULT_FILES_CONFIG=embedding_model=ollama/<your-embedding-model>; the supported providers are listed in LobeHub's knowledge-base deployment guide. Answers about your files still come from the Claude or GPT model you picked.
Every message re-sends the conversation so far, so long chats get more expensive per message; start a new topic when the subject changes.
At the time of writing, most Claude models on APIVAI are 56–62% below Anthropic's list prices and GPT models up to 86% below OpenAI's; for example, Claude Sonnet 4.6 is $1.26 / $6.32 per million input / output tokens against the official $3 / $15. It's prepaid and billed per token, with no subscription. The full table is at https://apivai.com/pricing?utm_source=devto&utm_campaign=lobechat.