Connect LibreChat to PromptUnit
LibreChat connects to PromptUnit as a custom endpoint: one variable in your .env file and a few lines in librechat.yaml.
Get your PromptUnit key
Sign up free at PromptUnit (no credit card) and connect the AI provider key you already use, for example your OpenAI or OpenRouter key. Your requests keep running on that key.
Then open API Keys in your dashboard and copy your PromptUnit key. Connecting more than one app? Under Routing, + New routing gives each app its own key and settings.
Add your key to .env
In the .env file of your LibreChat install, add:
PROMPTUNIT_API_KEY=your PromptUnit key from Step 1Add the endpoint to librechat.yaml
Under endpoints: → custom:, add:
endpoints:
custom:
- name: "PromptUnit"
apiKey: "${PROMPTUNIT_API_KEY}"
baseURL: "https://www.promptunit.ai/api/proxy/openai"
models:
default: ["gpt-6.1-sol"]
fetch: true
titleConvo: true
titleModel: "current_model"
modelDisplayLabel: "PromptUnit"The baseURL above is for an OpenAI key. With a different provider's key connected in PromptUnit, use its address instead:
- OpenAI:
https://www.promptunit.ai/api/proxy/openai - OpenRouter (models from many providers):
https://www.promptunit.ai/api/proxy/openrouter - Google Gemini:
https://www.promptunit.ai/api/proxy/google - Groq:
https://www.promptunit.ai/api/proxy/groq - DeepSeek:
https://www.promptunit.ai/api/proxy/deepseek
With fetch: true, LibreChat loads the models your own provider account can use; the default list is the fallback.
Restart LibreChat and pick PromptUnit
Restart LibreChat so it reads the new settings (with Docker: docker compose restart). Then choose PromptUnit in the endpoint menu and pick a model.
Watch the costs
Each message shows up on your PromptUnit dashboard with what it cost. PromptUnit checks every request and uses a cheaper model only when it would answer just as well; otherwise it uses the model you chose. Your first $5 of savings is free, no card needed.
If something doesn't look right
If PromptUnit doesn't appear in the menu, check the indentation in librechat.yaml (spaces, not tabs) and that LibreChat was restarted. If the model list is empty, check that the same provider's key is connected in PromptUnit.
Quick reference
The address you'll paste in, if you need it again:
https://www.promptunit.ai/api/proxy/openai