> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openp.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LobeChat

> Connect OpenPAI as an OpenAI provider in LobeChat

[LobeChat](https://lobehub.com/) 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`:

```bash theme={null}
# 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)

<Steps>
  <Step title="Open settings">
    Click the avatar at the top-right → **Settings → Language model**.
  </Step>

  <Step title="Choose OpenAI">
    In the provider list, choose **OpenAI** (this also works for Claude / Gemini).
  </Step>

  <Step title="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.
  </Step>

  <Step title="Client-side request mode">
    Check **Use client-side request mode** (optional) to keep the key only in the browser's local storage.
  </Step>

  <Step title="Test connection → start chatting">
    Click the **Check** button to verify connectivity, then return to the main screen and start a new chat.
  </Step>
</Steps>

## 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.
