LibreChat Integration

AVELIN API is fully compatible with LibreChat — a free, open-source, self-hosted chat interface that supports multiple AI providers. LibreChat gives you a ChatGPT-like experience while connecting to AVELIN's frontier models.

Why AVELIN + LibreChat? Self-host your chat UI, keep full data sovereignty, and access AVELIN's 1M-token context models — all with a familiar ChatGPT-style interface.

LibreChat is a free, open-source, self-hosted chat interface that replicates and extends the ChatGPT experience — but on your own infrastructure, with your own data, connected to any AI provider you choose. It supports multi-provider routing (talk to OpenAI, Anthropic, Google, and custom endpoints like AVELIN from one interface), conversation branching, file uploads, code interpretation, and a plugin system for extending functionality. It's the most popular self-hosted ChatGPT alternative with over 20k GitHub stars.

The killer feature is true data sovereignty with a zero-compromise UI. Unlike ChatGPT, your conversation history never leaves your server. Unlike raw API calls, you get a polished interface with conversation management, shared prompts, multi-user support, and model switching. It deploys with a single docker compose up and connects to AVELIN as a custom OpenAI-compatible endpoint. It's for teams, organizations, and privacy-minded individuals who want a ChatGPT-quality experience they fully own and control.


Quick Setup

Step 1: Get your AVELIN API key

Sign up at avelin.ai and generate an API key. It will look like sk-ave...xxxx.

Step 2: Install LibreChat

git clone https://github.com/danny-avila/LibreChat.git
cd LibreChat
cp .env.example .env
docker compose up -d

LibreChat runs at http://localhost:3080 by default.

Step 3: Configure AVELIN as a Provider

Edit your .env file and add AVELIN as a custom OpenAI-compatible endpoint:

# Custom endpoint for AVELIN
CUSTOM_NAME_1="AVELIN"
CUSTOM_BASE_URL_1="https://api.avelin.ai/v1"
CUSTOM_API_KEY_1="sk-avelin-YOUR_KEY"

Step 4: Start Chatting

  1. Restart LibreChat: docker compose up -d
  2. Open http://localhost:3080
  3. Select AVELIN from the endpoint dropdown
  4. Choose your model and start chatting

For Chat: avelin-pro

Featureavelin-proWhy it matters for LibreChat
Context window256K tokensLong conversations without losing context
Max output65K tokensDetailed, thorough responses
SpeedFastResponsive chat experience

For Coding: avelin-coding-pro

Featureavelin-coding-proWhy it matters for LibreChat
Context window1M tokensPaste entire codebases for review
Max output65K tokensGenerate large code files
ReasoningDeep step-by-stepCatches subtle bugs

Quick Reference

Use caseModel
Daily chat & questionsavelin-pro
Complex reasoningavelin-ultra
Code generation & reviewavelin-coding-pro
Architecture & designavelin-coding-ultra
Fast responsesavelin-fast
Agent/tool workflowsavelin-agentic-ultra

Why AVELIN for LibreChat?

  • Data sovereignty: Self-hosted UI + governed API = full control over your data
  • Prompt caching: ~80% cost reduction on repeated system prompts
  • Automatic failover: AVELIN switches providers if one is slow or down
  • Model diversity: 9 specialized models through one API key

Advanced Configuration

Conversation Titles

LibreChat auto-generates conversation titles. Use avelin-fast to minimize cost:

titleConvo: true
titleModel: "avelin-fast"

Streaming

Enable streaming for real-time token delivery:

endpoints:
  custom:
    - name: "AVELIN"
      # ... other config
      stream: true

Presets

Create presets in LibreChat for common workflows:

  • "Code Review" — avelin-coding-pro with coding system prompt
  • "Quick Answers" — avelin-fast with low temperature
  • "Deep Analysis" — avelin-ultra with high max tokens

Troubleshooting

IssueSolution
"Model not found"Check model name spelling in librechat.yaml
Slow responsesSwitch to avelin-fast for quicker replies
Connection refusedVerify CUSTOM_BASE_URL_1 is https://api.avelin.ai/v1
No models showingEnsure fetch: false and models are listed in default
Streaming not workingAdd stream: true to endpoint config