BroadRouter
Get started

Add BroadNet Inference to LibreChat as a custom endpoint

Updated

In librechat.yaml, add an entry under endpoints.custom with name BroadNet, apiKey set to an environment reference such as BROADNET_API_KEY, baseURL https://inference.broadnet.ai/v1, and models.default listing BroadNet IDs like broadnet/glm-5.3. Put the key in .env, mount the file into the container on Docker, and restart LibreChat. LibreChat adds /chat/completions to the base URL itself.

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

  1. Mount librechat.yaml (Docker only). Copy docker-compose.override.yml.example to docker-compose.override.yml and make sure the volume is active:
services:
  api:
    volumes:
      - type: bind
        source: ./librechat.yaml
        target: /app/librechat.yaml
  1. Add the endpoint to librechat.yaml in the project root, under endpoints.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.

  1. Set the key in .env:
BROADNET_API_KEY=your-broadnet-key
  1. Restart LibreChat. With Docker: docker compose down && docker compose up -d. For a local install, restart with npm run backend. BroadNet then appears in the endpoint selector.

Field notes

  • baseURL. LibreChat appends /chat/completions itself, so use the /v1 root above. Don’t set directEndpoint: 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/models as public catalog metadata for monitors, so listing models in default is 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 into librechat.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, apiKey and models.default are spelled right and indented inside endpoints.custom. LibreChat drops incomplete entries without a log line. On Docker, confirm the bind mount is uncommented in docker-compose.override.yml.
  • “Missing API Key for BroadNet”. BROADNET_API_KEY isn’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_provided keys 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.

Questions

Why doesn't my BroadNet endpoint appear in LibreChat?

LibreChat drops a custom endpoint with no error or log line if name, baseURL, apiKey or models.default is missing or misspelled. On Docker, also check that librechat.yaml is mounted at /app/librechat.yaml and that you restarted.

Can each user bring their own BroadNet key?

Yes. Set apiKey to user_provided. LibreChat then asks each user for a key the first time they pick the endpoint and stores it encrypted.

Why does LibreChat show "Missing API Key for BroadNet"?

The variable referenced in apiKey isn't set in .env. The endpoint still shows in the selector, and the error appears only when you send a message. Add the variable, then restart LibreChat.

Should the LibreChat baseURL include /chat/completions?

No. LibreChat appends /chat/completions to baseURL by default. Use https://inference.broadnet.ai/v1. Only set directEndpoint to true when the URL you enter is already the full completions endpoint.

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity