# LibreChat

<img
  src="/brand/banner-b-02.webp"
  alt=""
  loading="lazy"
  width="1280"
  height="549"
  className="brand-band"
/>

[LibreChat](https://www.librechat.ai) is a self-hosted, multi-provider chat UI.
It supports OpenAI-compatible gateways through the
`endpoints.custom` block in `librechat.yaml`.

*Setup guide: this config comes from LibreChat's official documentation and
has not been run end to end against the gateway. Corrections to [support@hyphen-solution.com](mailto:support@hyphen-solution.com).*

## 1. Get a key

[app.hyphen-solution.com](https://app.hyphen-solution.com) → sign in → pick a
plan or credit pack → **Dashboard → API Keys**. Copy the `sk-...` key.

## 2. Configure

Add to **`librechat.yaml`** next to your `docker-compose.yml`:

```yaml
version: 1.3.13
cache: true

endpoints:
  custom:
    - name: 'Hyphen'
      apiKey: '${HYPHEN_API_KEY}'
      baseURL: 'https://api.hyphen-solution.com/v1'
      models:
        default: ['minimax-m3', 'minimax-m2.7', 'minimax-m2.5', 'minimax-text-01']
        fetch: true
      titleConvo: true
      titleModel: 'minimax-m2.5'
      modelDisplayLabel: 'Hyphen'
```

Then put the key in your **`.env`**:

```bash
HYPHEN_API_KEY=sk-YOUR_KEY
```

The `${HYPHEN_API_KEY}` syntax only resolves if a matching entry exists in
`.env`. LibreChat does not fall back to the process environment.

Restart the stack:

```bash
docker compose down && docker compose up -d
```

## 3. Verify

Open LibreChat, click the endpoint selector at the top of the chat, and pick
**Hyphen**. Choose `minimax-m3` from the model dropdown and send:

```
Reply with the single word: connected
```

## What the fields do

- **`baseURL`** ends in `/v1`. LibreChat appends `/chat/completions`.
- **`models.fetch: true`** makes LibreChat call `GET /v1/models` on startup and
  populate the dropdown with the live catalog. The `default` list is the
  fallback if that call fails, and it sets the ordering.
- **`titleModel`** names the model used to auto-title conversations. Point it at
  `minimax-m2.5` so titling does not spend flagship time on a one-line job.
  `'current_model'` is also valid if you would rather it use whatever the
  conversation is using.
- **`modelDisplayLabel`** is the name shown next to assistant messages.
- **`apiKey: 'user_provided'`** is an alternative to `${...}`: it makes each
  user paste their own Hyphen key in the web UI instead of sharing yours. Use
  it if you host LibreChat for other people.

## Troubleshooting

- **Endpoint missing from the selector**. `librechat.yaml` failed to parse, or
  the `version` field is wrong. LibreChat logs the parse error at startup.
- **`401`**. The `.env` entry name does not match what `${...}` references.
- **Empty replies**. The M-series are reasoning models and need output
  headroom. See [Choosing a model](/choosing-a-model#the-max_tokens-gotcha).
- **`429`**. Monthly budget spent. See [Rate limits & caps](/rate-limits).
- **Config keys changed?** The `version` field pins the schema. Check the
  current shape in
  [LibreChat's custom endpoint docs](https://www.librechat.ai/docs/quick_start/custom_endpoints).

## Related

- [Models](/models): the full catalog.
- [Choosing a model](/choosing-a-model): which model for which job.
