Connect LibreChat to an OpenAI-compatible API.

Configure the custom endpoint, environment key and Docker mount; then separate a missing endpoint, missing model and 404.

For file-based setup, configure the OpenAI-compatible endpoint in librechat.yaml. LibreChat v0.8.5+ official Compose stacks include an Admin Panel for ongoing endpoint management (currently marked Preview); use one configuration path at a time when diagnosing a missing endpoint.

Choose the configuration path

Use the Admin Panel for ongoing browser-based changes. Its role and group overrides take effect when users log in. Use librechat.yaml for file-based setup or bootstrap configuration. YAML changes still require the API service to read the file and restart.

Use the API root and model ID

Endpoint type
Custom OpenAI-compatible endpoint
Base URL
https://chinagenai.com/v1
Model ID
free
API key
Your current ChinaGenAI site key, entered in LibreChat

This is the API root. LibreChat adds /chat/completions to it. Use the endpoint and model ID shown by the service you connect; the provider name does not change the OpenAI-compatible request format.

Add a custom endpoint

Merge this block under the existing top-level endpoints.custom list in librechat.yaml. Keep the rest of your configuration.

LibreChat custom endpoint block
endpoints:
  custom:
    - name: 'ChinaGenAI'
      apiKey: 'user_provided'
      baseURL: 'https://chinagenai.com/v1'
      models:
        default: ['free']
        fetch: false

user_provided asks each LibreChat user for their own API key. LibreChat documents that user-provided keys are stored encrypted. For one server-managed key, put the value in .env and reference it as $${CHINAGENAI_SITE_KEY} in apiKey; do not paste a real key into librechat.yaml.

Use provider: 'anthropic' only when the endpoint speaks Anthropic's native Messages API. For a gateway that exposes an OpenAI-compatible route, leave provider out.

For Docker, mount the config file

LibreChat's API container must be able to read librechat.yaml. Add this volume to docker-compose.override.yml:

Docker Compose config mount
services:
  api:
    volumes:
      - type: bind
        source: ./librechat.yaml
        target: /app/librechat.yaml

After changing YAML or the mount, recreate the services so the API container reads the current file:

Recreate LibreChat services
docker compose down && docker compose up -d

If the endpoint does not appear

  1. If you use YAML, confirm the file is in the project root, unless CONFIG_PATH points somewhere else. If you use the Admin Panel, check which role or group receives the endpoint.
  2. For Docker, verify the ./librechat.yaml bind mount targets /app/librechat.yaml in the API service.
  3. Check that the custom endpoint has a unique name, baseURL, apiKey and models. models.default must list at least one model even when models.fetch: true.
  4. If you set the ENDPOINTS environment variable, include custom and preserve the other endpoint names you need.
  5. After YAML changes, restart LibreChat and check the API startup logs. A malformed configuration can prevent LibreChat from starting.

One user reported a missing endpoint with clean logs; after a full Docker down/up cycle, they reported that it appeared. The maintainer also recommended checking ENDPOINTS when it is set. This is one dated case, not proof that every missing endpoint has the same cause. Read the original report and replies.

If the endpoint appears but no model does

Model discovery is separate from endpoint visibility. models.fetch: true asks the configured API for its model list, while models.default remains required as the fallback list. If the API has no compatible model-list route, list its exact model ID under models.default and leave fetching off.

A report opened against v0.8.4 was closed after a config-service change, then received a later follow-up about a prerelease. It does not establish a current universal defect. Check your installed version and use the explicit default model when discovery is unavailable. Seeing a model in the selector does not verify the key or send a chat request. Read the version-scoped report and follow-up.

If a chat request returns 404

Use the API root in baseURL, not the complete /chat/completions URL. LibreChat appends the route by default. If you must configure the full completions URL, set directEndpoint: true. Compare the captured request path with the expected path in the local request URL checker.

For the ChinaGenAI route, check current availability and site-key access and limits before using a key. The shared route is limited to short text Chat Completions; a successful model-list lookup does not prove a chat request will work.

Official references

Checked 27 October 2026 against the linked LibreChat documentation and reports. This is configuration guidance; no LibreChat workspace, key, provider request or model inference was tested.

Free API access and limits

Check the site free API access and limits before trying to obtain a site key. Read the current status and request limits before using a site key. It is not a source of official provider keys.

ChinaGenAI is not affiliated with the providers named here. This release contains setup guidance and explicitly labeled fictional examples, not claimed live model benchmarks.

Exact symptom wording and source

Use the quoted text to locate the relevant check. Providers and clients can phrase the same failure differently; compare the complete response before applying a fix.

  • Reported text: LibreChat custom endpoint missing from selector after Docker restart

    One report resolved after recreating the Docker services. A maintainer also advised including custom in ENDPOINTS when that variable is set; neither detail identifies every missing-endpoint cause.

    Open this check

    nothing shows up in the UI: Also nothing is logged as an error

    LibreChat discussion #9787, 23 September 2025

  • Reported text: LibreChat custom endpoint model list missing with user_provided API key

    The report was version-specific and closed after a configuration-service change. It is historical evidence for separating model discovery from endpoint setup, not proof of a current LibreChat defect.

    Open this check

    models are missing or not updated

    LibreChat issue #12894, opened 30 April 2026 and closed after PR #12466