---
title: LibreChat | RunAPI
description: Configure a LibreChat custom endpoint for RunAPI, mount its YAML in Docker,
  restart, and verify a chat.
url: https://runapi.ai/docs/resources/application-practices/librechat.md
canonical: https://runapi.ai/docs/resources/application-practices/librechat
locale: en
---

> HTML version: https://runapi.ai/docs/resources/application-practices/librechat
> Site index for agents: https://runapi.ai/llms.txt

# LibreChat

LibreChat custom endpoints are deployment configuration, not a per-user
connection form. You need access to the LibreChat deployment files and a
standard RunAPI API key from the [Authentication
Guide](https://runapi.ai/docs/guides/authentication.md).

## Install LibreChat

Install LibreChat with the [official local setup][1] or use your
existing deployment. Complete the installation before adding the custom
endpoint.



[1]: https://www.librechat.ai/docs/local

## Add the RunAPI endpoint

Create or update `librechat.yaml` in the LibreChat deployment directory.
Replace `YOUR_RUNAPI_MODEL_ID` with a current identifier from the [Model
Catalog](https://runapi.ai/models).

```yaml
version: 1.3.13
endpoints:
  custom:
    - name: "RunAPI"
      apiKey: "${RUNAPI_API_KEY}"
      baseURL: "https://runapi.ai/v1"
      models:
        default: ["YOUR_RUNAPI_MODEL_ID"]
        fetch: true
      titleConvo: true
      titleModel: "current_model"
      modelDisplayLabel: "RunAPI"
```

Store the key in `.env`, not directly in the YAML file:

```shell
RUNAPI_API_KEY=YOUR_RUNAPI_API_TOKEN
```

For Docker Compose, make sure `docker-compose.override.yml` mounts the
configuration file:

```yaml
services:
  api:
    volumes:
      - ./librechat.yaml:/app/librechat.yaml
```

Restart the LibreChat deployment after changing any of these files.

## Select a model

`models.default` guarantees at least one known model. With
`models.fetch: true`, LibreChat also requests the current model
inventory. Keep a valid default identifier even when discovery is
enabled so the endpoint remains usable if discovery is temporarily
unavailable.

## Verify the connection

After restart, select **RunAPI** from the endpoint selector, choose the
configured model, and send `Reply with the word connected.` A normal
reply confirms both the deployment configuration and the model request.

## Troubleshoot

* **RunAPI is absent from the endpoint selector:** validate the YAML
  indentation, confirm `docker-compose.override.yml` mounts the file,
  and restart the API container.
* **The endpoint loads but authentication fails:** confirm `.env`
  defines `RUNAPI_API_KEY` for the API container and recreate the
  container if its environment is stale.
* **No fetched models appear:** keep one current identifier in
  `models.default`, confirm `baseURL` ends in `/v1`, and inspect the API
  container logs.
* **LibreChat ignores edited YAML:** verify the host path and container
  path in the volume mount point to the file you changed.

For the shared protocol behavior, use the [LLM API
Quickstart](https://runapi.ai/docs/guides/llm-api/quickstart.md). For request and response
fields, use the [Chat Completions API
Reference](https://runapi.ai/docs/api/openai/chat-completions.md).

---

## More from RunAPI

- [Home](https://runapi.ai/.md)
- [Models](https://runapi.ai/models.md)
- [AI Video API Comparison](https://runapi.ai/ai-video-api-comparison.md)
- [OpenClaw Integration](https://runapi.ai/openclaw.md)
- [Best API for OpenClaw](https://runapi.ai/best-api-for-openclaw.md)
- [OpenClaw Image Generation](https://runapi.ai/openclaw-image-generation.md)
- [Hermes Agent Integration](https://runapi.ai/hermes-agent.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Claude API Pricing](https://runapi.ai/claude-api-pricing.md)
- [ChatGPT API Pricing](https://runapi.ai/chatgpt-api-pricing.md)
- [OpenAI API Pricing](https://runapi.ai/openai-api-pricing.md)
- [Gemini API Pricing](https://runapi.ai/gemini-api-pricing.md)
- [Claude Code Pricing](https://runapi.ai/claude-code-pricing.md)
- [Claude Code API](https://runapi.ai/claude-code-api.md)
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Claude Max vs API](https://runapi.ai/claude-max-vs-api.md)
- [Requesty Alternative](https://runapi.ai/requesty-alternative.md)
- [Docs](https://runapi.ai/docs/guides)
- [SDK](https://runapi.ai/sdk.md)
- [Skills](https://runapi.ai/skills.md)
- [MCP Server](https://runapi.ai/mcp.md)
- [CLI](https://runapi.ai/cli.md)
- [Feedback](https://runapi.ai/)
- [Contact](mailto:support@runapi.ai)
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "TechArticle",
    "headline": "LibreChat",
    "description": "Configure a LibreChat custom endpoint for RunAPI, mount its YAML in Docker, restart, and verify a chat.",
    "url": "https://runapi.ai/docs/resources/application-practices/librechat",
    "mainEntityOfPage": "https://runapi.ai/docs/resources/application-practices/librechat"
  }
]
```
