Skip to main content

Plugins

Libre WebUI supports three types of plugins:

  • Chat - AI language models (OpenAI, Anthropic, Groq, etc.)
  • Image Generation - Create images from text (ComfyUI, Flux)
  • Text-to-Speech - Convert text to audio (OpenAI TTS, ElevenLabs)

Chat Plugins

Connect to cloud AI providers alongside local Ollama models.

Supported Providers

ProviderModelsAPI Key VariableNotes
OpenAIGPT-4o, GPT-4, o1, o3, o4 (110+ models)OPENAI_API_KEYAlso provides TTS
AnthropicClaude Opus 4.5, Claude 4 Sonnet/OpusANTHROPIC_API_KEYBest for reasoning
Google GeminiGemini 2.0/2.5 Flash/Pro (55+ models)GEMINI_API_KEYIncludes Imagen
GroqLlama 3.1, Gemma, Qwen3GROQ_API_KEYFastest inference
MistralLarge, Medium, Codestral (71+ models)MISTRAL_API_KEYEU-based
OpenRouter300+ models from all providersOPENROUTER_API_KEYPay-per-token

Setup

Option 1: Environment variables (recommended for self-hosting)

Add API keys to backend/.env:

OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GROQ_API_KEY=gsk_...
GEMINI_API_KEY=...
MISTRAL_API_KEY=...
OPENROUTER_API_KEY=sk-or-...

Option 2: Per-user API keys (multi-user deployments)

Users can add their own API keys in Settings → Plugins → Configure. Keys are encrypted and stored per-user.

Enable plugins in Settings → Plugins.

Image Generation

Generate images using ComfyUI with Flux models.

ComfyUI Plugin

{
"id": "comfyui",
"name": "ComfyUI Flux",
"type": "image",
"endpoint": "http://localhost:8189/prompt",
"capabilities": {
"image": {
"model_map": ["flux1-dev", "flux1-schnell"],
"config": {
"sizes": ["512x512", "768x768", "1024x1024", "1920x1080"],
"default_size": "1024x1024"
}
}
}
}

Setup

  1. Install ComfyUI
  2. Add Flux models to ComfyUI
  3. Update the endpoint in plugins/comfyui.json to your ComfyUI server
  4. Enable in Settings → Plugins

Usage

Click the image icon in chat or use the Imagine page to generate images.

Text-to-Speech

Convert AI responses to spoken audio.

OpenAI TTS

Uses OpenAI's text-to-speech API.

OPENAI_API_KEY=sk-...

Voices: alloy, ash, coral, echo, fable, onyx, nova, sage, shimmer

ElevenLabs

High-quality multilingual voices with 7 TTS models.

ELEVENLABS_API_KEY=...

Models: eleven_multilingual_v2, eleven_turbo_v2_5, eleven_flash_v2_5, and more

Voices (16 available): Rachel, Domi, Bella, Antoni, Josh, Adam, Arnold, Sam, and more

Formats: MP3, PCM, ulaw (5000 character limit per request)

Usage

  1. Click the speaker icon on any message to hear it spoken
  2. Configure voice and model in Settings → Text-to-Speech
  3. Select between OpenAI TTS or ElevenLabs as your provider

Plugin Configuration

Plugins are JSON files in the plugins/ directory.

Plugin Structure

{
"id": "provider-name",
"name": "Display Name",
"type": "completion|image|tts",
"endpoint": "https://api.example.com/v1/...",
"auth": {
"header": "Authorization",
"prefix": "Bearer ",
"key_env": "API_KEY_VAR"
},
"model_map": ["model-1", "model-2"],
"capabilities": {}
}

Plugin Types

TypePurposeExample
completionChat/text generationOpenAI, Anthropic
imageImage generationComfyUI
ttsText-to-speechOpenAI TTS, ElevenLabs

Managing Plugins

Via UI

Settings → Plugins → Plugin Manager

  • Enable/disable plugins
  • Upload new plugins
  • Configure settings

Via API

# List plugins
GET /api/plugins

# Enable plugin
POST /api/plugins/activate/:id

# Disable plugin
POST /api/plugins/deactivate

Creating Custom Plugins

Chat Plugin Example

{
"id": "custom-llm",
"name": "Custom LLM",
"type": "completion",
"endpoint": "https://your-api.com/v1/chat/completions",
"auth": {
"header": "Authorization",
"prefix": "Bearer ",
"key_env": "CUSTOM_API_KEY"
},
"model_map": ["model-a", "model-b"]
}

The API must follow the OpenAI chat completions format.

TTS Plugin Example

{
"id": "custom-tts",
"name": "Custom TTS",
"type": "tts",
"endpoint": "https://your-api.com/v1/audio/speech",
"auth": {
"header": "Authorization",
"prefix": "Bearer ",
"key_env": "CUSTOM_TTS_KEY"
},
"capabilities": {
"tts": {
"voices": ["voice-1", "voice-2"],
"default_voice": "voice-1",
"formats": ["mp3", "wav"]
}
}
}

Troubleshooting

Plugin not working:

  • Check API key is set in .env
  • Verify plugin is enabled in Settings
  • Check server logs for errors

Image generation fails:

  • Verify ComfyUI is running
  • Check endpoint URL is correct
  • Ensure Flux models are installed

TTS not playing:

  • Check API key has credits
  • Verify audio format is supported
  • Check browser allows audio playback