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

# LibreChat

> Connect LibreChat to Routeway for a self-hosted ChatGPT-like interface.

LibreChat is an open-source, self-hosted chat interface with multi-model support. You can connect it to Routeway by adding a provider configuration to your `librechat.yml` file.

<Note>
  Requires a valid Routeway API key. Get yours from the [dashboard](https://routeway.ai/dashboard/api-keys).
</Note>

***

## Setup

<Steps>
  <Step title="Locate your LibreChat config">
    Find your LibreChat installation's `librechat.example.yml` file and create a copy named `librechat.yml` (if you haven't already).
  </Step>

  <Step title="Add Routeway configuration">
    Add the following to your `librechat.yml` under the endpoints section:

    ```yaml theme={null}
    - name: 'Routeway'
      apiKey: '${ROUTEWAY_API_KEY}'
      baseURL: 'https://api.routeway.ai/v1/'
      models:
        default: [
          "gpt-4.1",
          "claude-sonnet-4.5",
          "gemini-2.5-flash",
        ]
        fetch: true
      titleConvo: true
      titleModel: 'gpt-4.1'
      modelDisplayLabel: 'Routeway'
    ```

    <Info>
      Setting `fetch: true` will automatically load all available models from Routeway. The `default` list provides quick-access models shown at the top.
    </Info>
  </Step>

  <Step title="Set your API key">
    Add your Routeway API key as an environment variable:

    <CodeGroup>
      ```bash Shell (macOS / Linux / WSL) theme={null}
      export ROUTEWAY_API_KEY="YOUR_ROUTEWAY_API_KEY"
      ```

      ```powershell Windows PowerShell theme={null}
      $env:ROUTEWAY_API_KEY="YOUR_ROUTEWAY_API_KEY"
      ```
    </CodeGroup>
  </Step>

  <Step title="Restart LibreChat">
    Restart LibreChat to load the new configuration. Routeway will appear as a provider in the UI with all available models.
  </Step>
</Steps>

***

## Reference

| Setting           | Value                         |
| ----------------- | ----------------------------- |
| Base URL          | `https://api.routeway.ai/v1/` |
| Config file       | `librechat.yml`               |
| Env variable      | `ROUTEWAY_API_KEY`            |
| Auto-fetch models | `fetch: true`                 |
