# LibreChat


    Connect → LibreChat

# Use AxForge with LibreChat

    LibreChat is a
    self-hosted, multi-model chat app. Add AxForge as a custom endpoint in
    `librechat.yaml`.

## Get LibreChat

LibreChat is a server you host, not an extension. The usual route is Docker
    Compose from the project's repository — follow
    their install guide, then
    come back here for the endpoint. You need a running LibreChat and access to its
    `librechat.yaml` and `.env` before the step below.

## librechat.yaml

```
endpoints:
  custom:
    - name: "AxForge"
      apiKey: "${AXFORGE_API_KEY}"       # from your .env
      baseURL: "https://api.axforge.ai/v1"
      models:
        default: ["chat"]           # initial pick (required)
        fetch: true               # pull the full list from GET /v1/models
      titleConvo: true
      titleModel: "chat"
      modelDisplayLabel: "AxForge"
```

Put `AXFORGE_API_KEY=your-axforge-key` in your `.env`.

    **Three things to get right.** `apiKey` is
    mandatory — it cannot be blank (use `"user_provided"` to have each user
    supply their own). `baseURL` must include `/v1` (LibreChat
    appends `/chat/completions`). Always populate `default` — if
    `fetch` can't reach `/v1/models` it falls back to that list.

## Check that it worked

Two things, and the second is the one that proves it end to end:

      - **AxForge** is in the endpoint dropdown when you start a conversation.
- Its models load in the model list beside it, and a message gets a streamed reply.

      - The call appears in the console at
      Billing & usage within a minute or
      two. Nothing else confirms that _your_ key reached _our_ API — a reply
      alone could be a cache or another provider.

## When it does not work

      | What you see | What it means | Fix |  |

        | AxForge missing from the dropdown | `librechat.yaml` was not loaded, or the YAML is invalid | LibreChat logs a config error at startup — read the first lines of its log |  |

        | Endpoint appears, models empty | it reached the file but not the API | check `baseURL` ends `/v1` and the key resolved from `.env` |  |

        | `401` | the key did not resolve | `${AXFORGE_API_KEY}` must exist in the environment LibreChat runs in |  |

    Run the self-test first when you are
    unsure — it says in one click whether the problem is your key, your quota or us, so you
    know whether the tool is worth debugging at all.

      &larr; Open WebUI
      llm &rarr;



Source: https://axforge.ai/docs/connect/librechat/
