Skip to navigation
DocsLobeChat

Apps and SDKs

LobeChat

In short: LobeChat (LobeHub) is a chat interface that reaches the gateway through its OpenAI provider settings, or environment variables when self-hosted.

Updated View .md
On this page

LobeChat, now part of LobeHub, is a chat interface you can use in the browser, as a desktop app, or self-hosted with Docker. It reaches the gateway through its built-in OpenAI provider with a custom API address, so you do not need a plugin. Checked against LobeHub v2.2.19 and its self-hosting docs (October 2026).

You need an API key from API keys and this base URL:

Base URLhttps://api.oneaiapikey.com/v1

How do I set up LobeChat in the app?

Five steps set up the gateway in the LobeChat app.

  1. Open Settings → AI Providers → OpenAI.
  2. Paste your key as the API key, and set the API proxy address to the base URL above, including /v1.
  3. Click Check to test the connection. LobeHub sends a short request with one of the listed models.
  4. Fetch the model list (it comes from GET /v1/models, so it holds exactly the models your key can use) or add ids by hand, then switch on the ones you want.
  5. Pick one in a chat and send a message. The request shows up on your usage page.

The OpenAI provider keeps its built-in list of OpenAI model names. Hide the ones the gateway does not offer, or the picker will show models that return errors.

How do I set it up when I host LobeChat myself?

When you host LobeChat yourself, set the provider with environment variables instead of the app settings, so every user of your instance gets it without entering a key:

Environment
OPENAI_API_KEY=<your One AI API Key key>
OPENAI_PROXY_URL=https://api.oneaiapikey.com/v1
# Optional: show only these models
OPENAI_MODEL_LIST=-all,+z-ai-glm-5.3-flash:free,+qwen-qwen3.8-27b:free
  • OPENAI_API_KEY is your One AI API Key key. Every user of the instance spends from it, so give it a spend limit (see Cost control).
  • OPENAI_PROXY_URL replaces the default https://api.openai.com/v1. Keep the /v1: LobeHub appends /chat/completions to it.
  • OPENAI_MODEL_LIST uses LobeHub’s syntax: -all hides the built-in OpenAI models and each +id adds one of ours.

Can I set display names and capabilities?

Yes. The model list syntax can also set a display name, a context size and capabilities in angle brackets (fc for tool calls, vision for images, reasoning). LobeHub uses them to decide which buttons to show, such as image upload:

Environment
OPENAI_MODEL_LIST=-all,+z-ai-glm-5.3-flash:free=GLM 5.3 Flash<128000:fc>,+qwen-qwen3.8-27b:free=Qwen3.8 27B<1000000:vision:fc>

Take context sizes from the models table. The capability flags only change LobeHub’s interface; the gateway does not read them.

How do I fix common LobeChat errors?

Most LobeChat errors come from the address, the key or the model id.

  • Check fails: the address must end in /v1, not in /chat/completions and not with a trailing slash.
  • Empty replies: LobeHub’s docs list a missing /v1 as the usual cause. Add it and check again.
  • No models after fetching: the URL must end in /v1, and the key must be valid; a key with a model list shows only those models. Paid models are listed before a top-up, but return 402 with code paid_needs_deposit until you add $1 or more. See Errors.
  • A model is listed but fails: the id must match the models table exactly, and the key’s model list must include it.
  • Environment changes do nothing: restart the container after editing them.

↑ ↓ moveEnter openEsc close
New accounts$10 credit on sign-up
Claim $10 credit →