Skip to main content
LobeChat is an open-source, self-hostable modern AI chat framework with multi-model and plugin support.

Via environment variables (self-hosted)

If you self-host LobeChat, configure in .env:
# Point OpenAI traffic at OpenPAI
OPENAI_API_KEY=sk-XXXXXXXXXXXXXXXX
OPENAI_PROXY_URL=https://openp.ai/v1

# Optional: also route Anthropic through OpenPAI
ANTHROPIC_API_KEY=sk-XXXXXXXXXXXXXXXX
ANTHROPIC_PROXY_URL=https://openp.ai

# Optional: route Gemini through OpenPAI
GOOGLE_API_KEY=sk-XXXXXXXXXXXXXXXX
GOOGLE_PROXY_URL=https://openp.ai

# Explicitly expose the models you need (comma-separated)
OPENAI_MODEL_LIST="+gpt-5.5,+gpt-5.4-mini,+claude-opus-4-8,+gemini-3.1-pro-preview,+gemini-3.1-flash-lite"
After restarting the service, the model picker shows the models above.

Via web settings (LobeHub Cloud / deployed instance)

1

Open settings

Click the avatar at the top-right → Settings → Language model.
2

Choose OpenAI

In the provider list, choose OpenAI (this also works for Claude / Gemini).
3

Fill in the config

  • API Key: sk-XXXXXXXXXXXXXXXX
  • API proxy address: https://openp.ai/v1
  • Model list: gpt-5.5, claude-opus-4-8, gemini-3.1-pro-preview, etc.
4

Client-side request mode

Check Use client-side request mode (optional) to keep the key only in the browser’s local storage.
5

Test connection → start chatting

Click the Check button to verify connectivity, then return to the main screen and start a new chat.

Enable the Claude / Gemini native protocols too

To also use Claude thinking mode or Gemini multimodal, in LobeChat settings:
  • Under the Anthropic provider, set:
    • Base URL: https://openp.ai (note: without /v1)
    • API Key: the same OpenPAI key
  • Under the Google provider, set:
    • Base URL: https://openp.ai
    • API Key: the same OpenPAI key
The same OpenPAI key can call all three protocol endpoints, sharing the account quota.