# Put the whole catalog behind one LibreChat endpoint

> Markdown mirror of https://router.one/integrations/librechat for AI assistants and crawlers. Router One is an OpenAI-compatible LLM API gateway.
> Last updated: 2026-09-02

LibreChat is the open-source, self-hosted ChatGPT-style chat interface, and any OpenAI-compatible API can be added to it as a custom endpoint in librechat.yaml. One entry pointing at Router One puts GPT, Claude, Gemini, and DeepSeek family models in the endpoint menu for every user on your instance — and each conversation is traced for cost on the gateway, so a shared deployment stops being one opaque bill.

## Configure LibreChat to use the Router One base URL

Add an entry under endpoints.custom in librechat.yaml — the file is mounted into the API container as /app/librechat.yaml — with the gateway base URL, an apiKey that references a variable from your .env file, and models.fetch set to true so the list is pulled from the gateway's /models endpoint. The models.default array is the fallback shown if that fetch fails, and titleConvo lets the endpoint name new conversations with the model in use:

`librechat.yaml`

```bash
# librechat.yaml — add under your existing endpoints: key
endpoints:
  custom:
    - name: "Router One"
      apiKey: "${ROUTER_ONE_API_KEY}"
      baseURL: "https://api.router.one/v1"
      models:
        default: ["<model-id-from-/models>"]
        fetch: true
      titleConvo: true
      titleModel: "current_model"
      modelDisplayLabel: "Router One"

# .env
ROUTER_ONE_API_KEY=sk-your-router-one-key
```

## Which model ID should LibreChat send?

Copy the exact model ID from the /models page — IDs are case-sensitive, and the page lists each model's context window, capabilities, and current per-token rates. Create a dedicated API key per tool with its own maxSpend cap, so one runaway tool can't affect other workloads.

## Verify the LibreChat call in your request trace

After your first request, open Dashboard → Logs to see its full trace: model, tokens, cost, latency, and status code. From here every LibreChat call has a ledger and a trail instead of being a black box.

## FAQ

### Should I use models.fetch or a static model list?

Use fetch: true when you want every catalog model to appear as soon as it exists — LibreChat queries the gateway's /models endpoint, and the default array is only the fallback if that request fails. Use fetch: false with an explicit default list when you want to curate what users see, say three models with the exact IDs from /models; users can then only pick what you listed.

### Can users bring their own Router One key?

Yes — set apiKey to user_provided instead of an environment reference and LibreChat asks each user for a key in the UI. Each user's spend then lands on their own key and its own trace, which is the simplest way to split a shared instance's bill without touching your wallet.

### Which models can LibreChat use through the gateway?

Any chat-capable model in the catalog — GPT, Claude, Gemini, Grok, DeepSeek, GLM, MiniMax, and Doubao families. The /models page is the source of truth for model IDs and per-token rates.

### Does this work from Mainland China?

Yes. The gateway is reachable from Mainland China without a VPN, and the configuration is identical to the global setup.

### How do I debug a 401/403/429?

Open Dashboard → Logs first to see whether requests reached the gateway and with what status, then walk the error-codes reference to check env vars, key status, and limits.

## See also

- All integration guides: https://router.one/integrations
- Debug 401/403/429 in LibreChat: https://router.one/llm-api-error-codes
- n8n setup: https://router.one/integrations/n8n
- Immersive Translate setup: https://router.one/integrations/immersive-translate
- Open WebUI setup: https://router.one/integrations/open-webui
- Chatbox & Cherry Studio setup: https://router.one/chatbox-cherry-studio
- What the gateway layer does: https://router.one/llm-api-gateway
- OpenAI-compatible API: https://router.one/openai-compatible-api
- API docs: https://router.one/docs
- Canonical page: https://router.one/integrations/librechat
- Models and per-model token rates: https://router.one/models (markdown: https://router.one/models.md)
- Pricing: https://router.one/pricing
- API docs (markdown): https://router.one/docs.md
- Company facts: https://router.one/facts/company.md
