LobeChat Setup

Connect QCode.cc in LobeChat / LobeHub: the Anthropic and OpenAI provider entries, the Proxy URL field, and the self-hosted variables.

Updated 2026-10-14

Need an API key? Sign up →Endpoints & base URLs →

On This Page

Last verified: 2026-10-13 · 📄 Per official docs (LobeHub v2.2.19)

At a glance

Item Details
Models you can use Claude ✅ (Anthropic provider + Proxy URL) · GPT ✅ · Chinese models ✅ (OpenAI provider + Proxy URL) · Gemini ❌ (QCode does not offer the Gemini series — use Claude, GPT or a Chinese model)
Protocol & Proxy URL Anthropic Messages: https://api.qcode.cc/api · OpenAI compatible: https://api.qcode.cc/openai/v1
Where to configure App Settings → AI Providers, then the selected provider's API key, Proxy URL and Check controls
Self-hosted route ANTHROPIC_PROXY_URL and OPENAI_PROXY_URL environment variables instead of the app UI
Official docs AI Model Providers

The app is published today under the LobeHub name — its own overview text still says the multi-model idea "began with LobeChat's multi-model support" — so the docs site, the desktop builds, the lobehub/lobehub image and the open-source Community Edition all sit under that brand. Search for LobeChat and you land on LobeHub.

Which protocol

Models you want Provider to enable Proxy URL
Claude (claude-sonnet-5, claude-opus-5, claude-haiku-5-5) Anthropic https://api.qcode.cc/api
GPT (gpt-6-sol, gpt-5.6-terra) OpenAI https://api.qcode.cc/openai/v1
Chinese models (deepseek-v4.1-flash, glm-5.3, qwen3.8-max, kimi-k3) OpenAI https://api.qcode.cc/openai/v1

🔴 Never call Claude through the OpenAI provider. QCode serves Claude only on the Anthropic endpoint; a claude-* id on the OpenAI-compatible endpoint is rejected, and gpt-* ids are not served on the Anthropic endpoint either. One QCode key (cr_…) covers both entries.

Type the Proxy URL exactly as in the table: no trailing slash, and do not paste a full request path such as /v1/chat/completions into that field — LobeHub defines it as "the provider API base URL or a compatible endpoint". Whether the Anthropic field expects any extra path segment is not documented, so enter the address QCode hands you as it is. See Endpoints & API Paths.

Install

Pick how you run the app first; where the key lives follows from that.

  • Desktop or web — "Download the macOS, Windows, or Linux app from the official download page"; the desktop build is Electron-based, and in a browser you simply "Open LobeHub in a modern browser". Configure it through the app UI below.
  • Self-hosted, single Docker image (official command; the env file holds the variables from the last subsection):
docker run -it -d -p 3210:3210 --network pg --env-file lobehub.env --name lobehub lobehub/lobehub
  • Self-hosted, Docker Compose (official script, then compose):
mkdir lobehub && cd lobehub
bash <(curl -fsSL https://lobe.li/setup.sh) -l en
docker compose up -d

To let the desktop app drive an instance you host yourself, the desktop doc requires "your self-hosted instance version is 1.83.6 or higher to support desktop" connection features: click the Wi-Fi icon in the upper right corner, enter your instance address, then connect. The same doc also requires that the instance "is correctly configured with the OIDC-related environment variables" before you connect. The server release this page was checked against is v2.2.19 (2026-10-07); 1.83.6 is the desktop figure quoted by that doc, not the same number.

So there are two paths on this page: cloud and desktop use the UI fields, self-hosting can use environment variables.

Configure

LobeHub is explicit that the fields depend on the provider: "Open App Settings → AI Providers, then select the provider you want to configure. The available fields depend on the provider". The documented sequence is "Select a provider from the list and turn on its switch", then "Enter the credentials shown on the page. Most cloud providers use an API key", then "If Proxy URL is available, enter the provider API base URL or a compatible endpoint", then "Select Check to test the connection", then "Enable a model in the model list. You can also fetch or add models when those actions are available." The guide adds that "Your changes are saved automatically. You can then select the provider and model in the Agent settings."

Two limits worth stating plainly. First, the wording is conditional — If Proxy URL is available — so this page does not claim every provider exposes that field, and LobeHub publishes no Cloud-versus-Desktop matrix of who does. If your build shows no Proxy URL input for Anthropic or OpenAI, this guide cannot repoint it. Second, Cloud and Desktop are not opposites: "The desktop app can use Cloud services and cloud models."

Configure Claude (Anthropic provider)

The official Anthropic guide, in its own order:

  1. "Open App Settings → AI Providers, select Anthropic, and enable the provider"
  2. "Enter the API key. If you use a proxy, enter its proxy URL" — your QCode cr_… key, and Proxy URL https://api.qcode.cc/api
  3. "Select Check to test the connection"
  4. "Enable the Claude models you need, then select one in the Agent settings"

Pick ids from the QCode list: claude-sonnet-5 for daily work, claude-sonnet-5-5, claude-opus-5 or claude-opus-5-5 for hard tasks, claude-haiku-5-5 for light ones; claude-sonnet-4-6, claude-haiku-4-5-20251001, claude-fable-5 and claude-fable-5-1 are available as well. This page covers the built-in Anthropic and OpenAI entries only; LobeHub documents many other provider guides, and nothing here has been checked against them.

Configure GPT and Chinese models (OpenAI provider)

Same shape, the OpenAI guide's own steps:

  1. "Open App Settings → AI Providers, select OpenAI, and enable the provider"
  2. "Enter the API key. If you use a proxy or compatible endpoint, enter its proxy URL" — the same cr_… key, Proxy URL https://api.qcode.cc/openai/v1
  3. "Select Check to test the connection"
  4. "Enable the OpenAI models you need, then select one in the Agent settings"

Chinese-family ids go through this same provider and this same Proxy URL: deepseek-v4.1-flash, deepseek-v4-pro, glm-5.3, qwen3.8-max, kimi-k3 — see Chinese Models. You do not need the separate DeepSeek, Qwen or Moonshot guides for that; one OpenAI-compatible entry covers the whole list. If your id is not in the built-in picker, add it where the docs allow fetching or adding models.

Self-hosted environment variables

On a Docker or Compose deployment the same two endpoints are configured per provider in the env file. The reference documents ANTHROPIC_PROXY_URL as an item to "override the default Anthropic API request base URL" and OPENAI_PROXY_URL as an item to "override the default OpenAI API request base URL", which makes them the self-hosted twin of the UI's Proxy URL field:

Variable Documented default Set it to
ANTHROPIC_API_KEY – your QCode cr_… key
ANTHROPIC_PROXY_URL https://api.anthropic.com https://api.qcode.cc/api
OPENAI_API_KEY – the same key
OPENAI_PROXY_URL https://api.openai.com/v1 https://api.qcode.cc/openai/v1
OPENAI_MODEL_LIST – the ids you want, see below
ANTHROPIC_CLIENT_TIMEOUT 295000 leave alone unless long calls are cut off

OPENAI_MODEL_LIST is "Used to control the model list": + adds a model, - hides one, and -all hides the built-in set first — the form you want when the endpoint only serves what you name:

ANTHROPIC_API_KEY=cr_your_qcode_key
ANTHROPIC_PROXY_URL=https://api.qcode.cc/api
OPENAI_API_KEY=cr_your_qcode_key
OPENAI_PROXY_URL=https://api.qcode.cc/openai/v1
OPENAI_MODEL_LIST=-all,+gpt-6-sol,+gpt-5.6-terra,+glm-5.3,+deepseek-v4.1-flash

Whether the /v1 suffix belongs in the value is a property of the endpoint, not of LobeChat — the docs tell you to "check the request suffix of your proxy service provider", and if an answer comes back empty they suggest adding the /v1 suffix and retrying. For QCode: the OpenAI value keeps /openai/v1, the Anthropic value stops at /api. The reference also documents per-provider items for the Chinese services (DEEPSEEK_PROXY_URL, QWEN_PROXY_URL, MOONSHOT_PROXY_URL); point one at QCode only if you deliberately want it behind that provider's entry.

Verify

The documented check is in the app: "Select Check to test the connection" on the provider card. This page has no test key, so no HTTP result is claimed for any setting above. If Check fails, fix the Proxy URL and the key before touching anything else.

To separate a gateway problem from an app problem, call the endpoints directly:

KEY="cr_your_qcode_key"

# Anthropic endpoint — Claude ids only
curl -X POST https://api.qcode.cc/api/v1/messages \
  -H "x-api-key: $KEY" -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-5","max_tokens":32,"messages":[{"role":"user","content":"ping"}]}'

# OpenAI compatible endpoint — GPT and Chinese ids, never claude-*
curl -X POST https://api.qcode.cc/openai/v1/chat/completions \
  -H "authorization: Bearer $KEY" -H "content-type: application/json" \
  -d '{"model":"gpt-6-sol","messages":[{"role":"user","content":"ping"}]}'

A JSON answer containing content (Anthropic) or choices (OpenAI) means the endpoint side responded, and the remaining problem sits in the app's settings. Usage is billed per token; per-model rates are listed on qcode.cc/models.

Troubleshooting / Known limitations

Symptom What the docs say What to do
Empty answer after setting OPENAI_PROXY_URL you "may encounter a situation where the AI returns an empty message"; the documented fix is to recheck the variable and whether the /v1 "suffix is added correctly (if required)" keep https://api.qcode.cc/openai/v1 exactly, no trailing slash
A claude-* id is rejected — QCode does not serve the Claude family on the OpenAI-compatible address (model_not_available_on_endpoint); move it to the Anthropic provider with https://api.qcode.cc/api
Long Anthropic calls are cut off ANTHROPIC_CLIENT_TIMEOUT, default 295000, and that timeout "is also used by Anthropic-compatible providers that rely on the Anthropic SDK" raise it in self-hosting, only for long generations
Deployed on Vercel a "10-second serverless function timeout limit" in our reading: answers longer than that cap need Docker or another host
A provider becomes unavailable "This does not guarantee automatic failover" configure the second provider yourself and switch by hand
Connection error, key rejected "Check your API key for extra spaces. Check that the key type matches the provider" re-paste the cr_… key, confirm the provider
Your model id is not in the list "Your account tier can exclude a model, or the provider can retire it" for QCode, add the id yourself — the built-in picker is not QCode's catalogue
Rate limit errors "You reached the provider's request rate limit" lower the request rate, or switch provider

Two things QCode does not have: gpt-6-luna and gpt-5.6-luna — use another GPT model (gpt-6.1-sol / gpt-6-sol / gpt-5.6-terra); and the Gemini series — use Claude, GPT or a Chinese model instead. If the primary Anthropic address is unreachable for you, the same key also works on https://asia.qcode.cc/api and https://us.qcode.cc/api. Which LobeChat build shows the Proxy URL field for which provider is not documented by LobeHub, so that difference is out of scope here.

Get started with QCode

One API key for Claude Code, Codex and more — billed per token, per-model prices on qcode.cc/models

Enterprise →