From 3624bfd4609b2cde63e0fe6a5426600de244ed87 Mon Sep 17 00:00:00 2001 From: RouterPlex Date: Tue, 20 Oct 2026 00:43:39 +0000 Subject: [PATCH] docs: add RouterPlex custom endpoint provider --- .../librechat_yaml/ai_endpoints/meta.json | 1 + .../ai_endpoints/routerplex.mdx | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 content/docs/configuration/librechat_yaml/ai_endpoints/routerplex.mdx diff --git a/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json b/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json index c46fe3dfdd..09ea0eb18e 100644 --- a/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json +++ b/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json @@ -24,6 +24,7 @@ "openrouter", "perplexity", "portkey", + "routerplex", "shuttleai", "togetherai", "truefoundry", diff --git a/content/docs/configuration/librechat_yaml/ai_endpoints/routerplex.mdx b/content/docs/configuration/librechat_yaml/ai_endpoints/routerplex.mdx new file mode 100644 index 0000000000..f66079cf12 --- /dev/null +++ b/content/docs/configuration/librechat_yaml/ai_endpoints/routerplex.mdx @@ -0,0 +1,53 @@ +--- +title: RouterPlex +icon: Plug +description: Configure RouterPlex as a custom endpoint in LibreChat. +--- + +RouterPlex is a hosted gateway that routes requests to models from Anthropic, OpenAI, Google, DeepSeek, Moonshot, Alibaba, and other vendors through a single OpenAI-compatible endpoint. Usage is billed at vendor list price from a prepaid balance, and each API key can have its own hard USD budget. + +## Get an API key + +Create an account at [routerplex.com](https://routerplex.com/), add credit from the billing page (card or crypto), and create a key from the [dashboard](https://routerplex.com/dashboard). Add it to your `.env` file: + +```bash filename=".env" +ROUTERPLEX_API_KEY=your-api-key +``` + +Set a budget on the key when you create it. Requests fail once the key reaches its budget, which caps what a single LibreChat deployment can spend. + +## Configuration + +Add the endpoint to the `custom` list under `endpoints` in your `librechat.yaml`. If your file already has an `endpoints.custom` list, paste only the `- name:` entry into it, keeping the same indentation: + +```yaml filename="librechat.yaml" +endpoints: + custom: + - name: "RouterPlex" + apiKey: "${ROUTERPLEX_API_KEY}" + baseURL: "https://api.routerplex.com/v1" + models: + default: ["claude-sonnet-4-6", "gpt-6-sol", "deepseek-v4-pro"] + fetch: true + titleConvo: true + titleModel: "deepseek-v4-flash" + modelDisplayLabel: "RouterPlex" +``` + +To pin a fixed model list instead of fetching the catalog, set `fetch: false` and list the models yourself: + +```yaml filename="librechat.yaml" + models: + default: ["claude-sonnet-4-6", "gpt-6-sol", "gemini-3.1-pro", "deepseek-v4-pro"] + fetch: false +``` + +To let each user supply their own key through the LibreChat UI instead of reading one from `.env`, set `apiKey: "user_provided"`. + +## Notes + +- Model IDs are used exactly as listed, with no vendor prefix, and are case-sensitive. The live list, with context windows and prices per million tokens, is at [routerplex.com/api/models](https://routerplex.com/api/models). +- With `fetch: true`, LibreChat loads the model list for your key from RouterPlex, so new models appear automatically. The `default` array is only the initial selection. +- `gpt-image-2` in the catalog is an image model, not a chat model. Keep it out of chat model lists. +- A `402` response means the account balance is used up. A `403` means the key reached its own budget or the model is not on its allowlist. Both come from RouterPlex, not LibreChat. Add credit or raise the key's budget in the dashboard, then retry. +- Create a separate key for LibreChat so its budget and usage logs stay apart from your other tools.