Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"litellm",
"mistral",
"mlx",
"modelflare",
"moonshot",
"nearai",
"neurochain",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Modelflare
icon: Plug
description: Configure Modelflare as a custom endpoint in LibreChat.
---

[Modelflare](https://modelflare.dev) is an AI API gateway that serves chat models from several providers through one OpenAI-compatible endpoint and one API key. See the [Modelflare docs](https://docs.modelflare.dev) for details.

## Get an API key

Create an account at [modelflare.dev](https://modelflare.dev) and create a key on the [API Keys page](https://modelflare.dev/keys). A Smart API Key can call every model available to your account. A regular key only calls the models of its own group. Add the key to your `.env` file:

```bash filename=".env"
MODELFLARE_API_KEY=your-api-key
```

## 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: "Modelflare"
apiKey: "${MODELFLARE_API_KEY}"
baseURL: "https://modelflare.dev/v1"
models:
default: ["gpt-5.6-sol"]
fetch: true
titleConvo: true
titleModel: "current_model"
modelDisplayLabel: "Modelflare"
```

To let each user supply their own key through the LibreChat UI instead of reading one from `.env`, set `apiKey: "user_provided"`. Users then see a key input field when they select the endpoint.

## Notes

- With `fetch: true`, LibreChat loads the models your key can call from `GET https://modelflare.dev/v1/models`. Use the exact model `id` from that list or from [Models & Pricing](https://modelflare.dev/pricing).
- For deployments in mainland China, `https://origin.modelflare.dev/v1` serves the same API and can be used as the `baseURL`.
- A `model_not_found` error means the key cannot reach that model. Use a Smart API Key or a key whose group includes the model.