Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack 🎉 Learn more
LibreChat

Moonshot

Configure Moonshot AI as a custom endpoint in LibreChat.

Archived documentation

You are reading the frozen documentation for v0.8.7, which is no longer maintained. Go to the latest docs.

Moonshot AI serves its Kimi models through an OpenAI-compatible API that you can add to LibreChat as a custom endpoint.

Get an API key

Create a key from the Moonshot platform. Add it to your .env file:

MOONSHOT_API_KEY=your-api-key

Configuration

Add the endpoint under endpoints.custom in your librechat.yaml:

    - name: "Moonshot"
      apiKey: "${MOONSHOT_API_KEY}"
      baseURL: "https://api.moonshot.ai/v1"
      models:
        default: ["kimi-k2.5"]
        fetch: true
      titleConvo: true
      titleModel: "current_model"
      modelDisplayLabel: "Moonshot"

Notes

  • For models with reasoning capabilities such as kimi-k2.5 and kimi-k2-thinking, the endpoint name must be set to "Moonshot" (case-insensitive) for interleaved reasoning to work with tool calls. A different name causes errors like thinking is enabled but reasoning_content is missing in assistant tool call message. See Moonshot's documentation for details.