LibreChat

Moth DocsTutorials

A chat app you host yourself, where Moth goes in as a custom endpoint in its configuration file.

  1. Add the key

    Put MOTH_API_KEY=moth_your_key_here in LibreChat's .env.

  2. Add the endpoint

    Add the entry below to librechat.yaml. The name can be anything except LibreChat's own endpoint names, such as openAI or anthropic.

  3. Mount the file

    Copy docker-compose.override.yml.example to docker-compose.override.yml and mount ./librechat.yaml at /app/librechat.yaml in the api service.

  4. Restart and check

    Run docker compose up -d. Moth appears in the endpoint menu with its models, and a chat streams its reply and gets a title.

librechat.yaml
version: 1.3.18
cache: true
endpoints:
  custom:
    - name: 'Moth'
      apiKey: '${MOTH_API_KEY}'
      baseURL: 'https://api.runmoth.si/v1'
      models:
        default: ['claude-sonnet-4.6', 'gemini-3.8-flash', 'deepseek-v4.1-flash']
        fetch: true
      titleConvo: true
      titleModel: 'deepseek-v4.1-flash'
      modelDisplayLabel: 'Moth'
  • fetch: true reads the model list from Moth, and default is the list shown if that fails.
  • titleModel names the model that writes chat titles. Each title is a paid call, so a low-priced model fits.
  • LibreChat adds /chat/completions to baseURL itself.