# LobeChat

> Point LobeChat (LobeHub) at the gateway through its OpenAI provider settings, or with environment variables when you host it yourself.

Source: https://oneaiapikey.com/docs/apps/lobechat

[LobeChat](https://lobehub.com), now part of LobeHub, is a chat interface you can use hosted or run yourself. It reaches the gateway through its OpenAI provider with a custom API address. Checked against LobeHub v2.2.19.

You need an API key from [API keys](https://oneaiapikey.com/console/keys) and this base URL:

Base URL `https://api.oneaiapikey.com/v1`

## In the 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.
4. Fetch or add the models you want, then pick one in a chat and send a message. The request shows up on your [usage page](https://oneaiapikey.com/console/usage).

## When you host it yourself

Set the provider with environment variables instead, so every user of your instance gets it:

Environment:

```bash
OPENAI_API_KEY=<your Relaykit key>
OPENAI_PROXY_URL=https://api.oneaiapikey.com/v1
# Optional: show only these models
OPENAI_MODEL_LIST=-all,+claude-haiku-4-5,+claude-sonnet-5-5
```

`OPENAI_MODEL_LIST` uses LobeHub’s syntax: `-all` hides the default OpenAI models and each `+id` adds one of ours.

## Troubleshooting

- **Check fails**: the address must end in `/v1`, not in `/chat/completions`.
- **A model is listed but fails**: the id must match the [models table](https://oneaiapikey.com/docs/models#current-models) exactly, and the key’s model list must include it.

> **Source:** Variable names follow LobeHub’s [model provider environment variables](https://github.com/lobehub/lobehub/blob/main/docs/self-hosting/environment-variables/model-provider.mdx). Menu names can change between releases.
