aimldocs
Integrations

LibreChat

Add ai.ml to LibreChat as a custom endpoint.

LibreChat adds OpenAI-compatible APIs as custom endpoints in librechat.yaml:

cookbook/integrations/librechat/librechat.yaml
# librechat.yaml: add under the existing top-level `endpoints:` key
endpoints:
  custom:
    - name: "ai.ml"
      # an env name of its own: some names (OPENROUTER_API_KEY) re-point
      # LibreChat's built-in endpoints
      apiKey: "${AIML_API_KEY}"
      baseURL: "https://api.ai.ml/v1"
      models:
        default: ["anthropic/claude-sonnet-4.6", "openai/gpt-5", "google/gemini-2.5-flash"]
        fetch: true
      titleConvo: true
      # without it, titles are asked of gpt-3.5-turbo, which is not served
      titleModel: "openai/gpt-5-mini"
      modelDisplayLabel: "ai.ml"
  • models.fetch: true reads the list from GET /v1/models. The default list is shown when the fetch fails.
  • Set titleModel. Without it LibreChat names conversations with gpt-3.5-turbo, which ai.ml does not serve, and titles fail.
  • To use Anthropic's protocol instead, add provider: "anthropic" and set baseURL to https://api.ai.ml. LibreChat does not fetch models for that provider, so list them under default.

Checked against LibreChat's documentation on 2026-10-02; not run here.