Via environment variables (self-hosted)
If you self-host LobeChat, configure in.env:
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
- Base URL:
- Under the Google provider, set:
- Base URL:
https://openp.ai - API Key: the same OpenPAI key
- Base URL: