Skip to content

Connect LibreChat to Gonka Broker

LibreChat is an open-source, self-hosted chat UI — a ChatGPT-style interface that talks to many AI providers. It reaches Gonka Broker through its custom endpoint mechanism, so you add Gonka Broker once in librechat.yaml and its models show up in the model picker for everyone on your instance.

  • A Gonka API key (starts with gnk-prx-). See Create a Gonka API Key.
  • A running, self-hosted LibreChat instance. See the LibreChat docs for installation.
  • Your instance must actually load librechat.yaml. The default Docker setup does not mount it — enable it by configuring docker-compose.override.yml exactly as described in LibreChat’s custom endpoints guide. Without this, the endpoint you add below will not appear.

Open your librechat.yaml and add an entry under endpoints.custom:

librechat.yaml
version: 1.3.13
endpoints:
custom:
- name: "Gonka Broker"
apiKey: "${Gonka_API_KEY}"
baseURL: "https://proxy.gonkabroker.com/v1"
models:
default: ["MiniMaxAI/MiniMax-M2.7"]
fetch: true
titleConvo: true
titleModel: "current_model"
modelDisplayLabel: "Gonka Broker"
iconURL: "https://gonkabroker.com/img/gonka-broker-icon.svg"

With fetch: true, LibreChat loads the live model list from Gonka Broker‘s public /v1/models endpoint, so new models appear automatically — the default array is only the initial selection.

The config above reads the key from an environment variable. Add it to your .env file:

.env
Gonka_API_KEY=gnk-prx-your-key-here

To let each user enter their own key from the LibreChat UI instead of using a shared one, set apiKey: "user_provided" — users then see a key field when they select the endpoint.

Restart LibreChat so it reloads librechat.yaml. For Docker, recreate the containers with docker compose down && docker compose up -d — a plain docker compose restart does not apply a newly added librechat.yaml mount. Then open the app: Gonka Broker appears in the endpoint selector. Pick it, choose a model, and start chatting.

Send any message with Gonka Broker selected. A streamed reply confirms the connection. If you run LibreChat with logs visible, the request shows the model id that served it (for example MiniMaxAI/MiniMax-M2.7).

  • Gonka Broker not in the selectorlibrechat.yaml wasn’t reloaded (restart LibreChat) or the endpoints.custom indentation is off.
  • No models listed — the key env var is unset or misnamed, so fetch: true can’t read the model list. Confirm Gonka_API_KEY is set and the value starts with gnk-prx-.
  • 401 / invalid API key — wrong or paused key. Create a fresh one from Create a Gonka API Key.