LibreChat is an open-source chat app that supports OpenAI-compatible services as custom endpoints. You define them in librechat.yaml, keep keys in .env, and, on Docker, mount the YAML file into the container. BroadRouter is BroadNet’s own site; the steps follow LibreChat’s custom endpoint guide.
Setup
- Mount librechat.yaml (Docker only). Copy
docker-compose.override.yml.exampletodocker-compose.override.ymland make sure the volume is active:
services:
api:
volumes:
- type: bind
source: ./librechat.yaml
target: /app/librechat.yaml
- Add the endpoint to
librechat.yamlin the project root, underendpoints.custom:
endpoints:
custom:
- name: 'BroadNet'
apiKey: '${BROADNET_API_KEY}'
baseURL: 'https://inference.broadnet.ai/v1'
models:
default:
- 'broadnet/glm-5.3'
- 'broadnet/qwen3.8-27b'
- 'broadnet/deepseek-v4.1-flash'
- 'broadnet/gemma-4-26b-a4b'
fetch: false
titleConvo: true
titleModel: 'broadnet/gemma-4-26b-a4b'
modelDisplayLabel: 'BroadNet'
Keep any top-level keys your file already has, such as version.
- Set the key in
.env:
BROADNET_API_KEY=your-broadnet-key
- Restart LibreChat. With Docker:
docker compose down && docker compose up -d. For a local install, restart withnpm run backend. BroadNet then appears in the endpoint selector.
Field notes
- baseURL. LibreChat appends
/chat/completionsitself, so use the/v1root above. Don’t setdirectEndpoint: true; that option is for a baseURL that already is the full completions URL. - fetch: false. This is LibreChat’s default; we set it to make the choice visible. BroadNet’s docs describe
GET /v1/modelsas public catalog metadata for monitors, so listing models indefaultis more predictable. - titleModel. LibreChat writes a title for each chat with an extra request. A small, cheap model without reasoning keeps that call short. BroadNet’s docs don’t list reasoning for Gemma 4 VL 26B.
- user_provided. Set
apiKey: 'user_provided'if each user should enter their own BroadNet key in the UI. LibreChat stores each user’s key encrypted and asks for it the first time they pick the endpoint. - Unique name. A second endpoint with the same name, ignoring case, silently replaces the first. If you already have an entry called BroadNet, rename one.
- No literal keys. LibreChat’s docs recommend the
${VAR}reference over a key typed intolibrechat.yaml, which would sit in the file in plain text.
Which model to pick
| Use | Model |
|---|---|
| Default chat, tools, JSON | GLM 5.3 |
| Images and Arabic | Qwen3.8 27B |
| Long documents, 1M context | DeepSeek V4.1 Flash |
| Titles and quick replies | BroadNet Gemma 4 VL 26B |
Of these models, only Gemma 4 VL 26B runs on the $5 starting credit, which also covers the two Transcribe models. Compare prices on the pricing page.
Troubleshooting
- The endpoint doesn’t appear. Check that
name,baseURL,apiKeyandmodels.defaultare spelled right and indented insideendpoints.custom. LibreChat drops incomplete entries without a log line. On Docker, confirm the bind mount is uncommented indocker-compose.override.yml. - “Missing API Key for BroadNet”.
BROADNET_API_KEYisn’t in.env, or LibreChat wasn’t restarted. The endpoint still appears; the error shows only when you send a message. - 401 from the provider. The key is wrong, expired, or the pay-as-you-go allowance is used up.
- Model errors. Each ID must match BroadNet’s exactly, with the
broadnet/prefix. GLM 5.3, Qwen3.8 27B and DeepSeek V4.1 Flash need a top-up. - Empty replies. DeepSeek V4.1 Flash, GLM 5.3 and Qwen3.8 27B reason first, and reasoning counts toward
max_tokens. If you set a small max output in LibreChat’s parameters, raise it. Why answers come back empty. - 429 with many users. One pay-as-you-go key allows 30 requests a minute and 4 at once, shared by everyone on the endpoint. Title requests count too.
user_providedkeys spread the load. See errors and retries. - Plan keys. An unlimited plan session runs one request at a time and can’t be shared, so it doesn’t suit a multi-user LibreChat.
