LibreChat
Add AICredits to LibreChat as a custom OpenAI-compatible endpoint for a self-hosted ChatGPT-style team UI.
Use this page with an AI assistant
Opens a new chat with this docs URL and the correct AICredits base URLs.
LibreChat is a self-hosted ChatGPT-style interface with model switching, agents, MCP, and multi-user auth. Add AICredits as a custom OpenAI-compatible endpoint to route chat requests through your AICredits wallet.
Custom Endpoint
Add an AICredits endpoint to your LibreChat configuration:
endpoints:
custom:
- name: "AICredits"
apiKey: "${AICREDITS_API_KEY}"
baseURL: "https://api.aicredits.in/v1"
models:
default:
- "openai/gpt-4o-mini"
- "anthropic/claude-sonnet-4.5"
- "google/gemini-2.5-flash"
titleConvo: true
titleModel: "openai/gpt-4o-mini"Set the key in the container environment:
AICREDITS_API_KEY=sk-your-aicredits-keyRestart LibreChat after changing the YAML file or environment.
Use exact model IDs from Models. AICredits accepts provider-prefixed IDs such as anthropic/claude-sonnet-4.5 through the OpenAI-compatible chat endpoint.
When LibreChat Is Useful
LibreChat is a good fit when you want:
| Need | Why LibreChat helps |
|---|---|
| Shared team chat | Multi-user ChatGPT-style interface |
| Model comparison | Users can switch between AICredits models |
| Admin control | Centralize provider keys and endpoint config |
| Agents and tools | Use LibreChat features while billing through AICredits |
Hostinger Deployment Notes
Do not expose a LibreChat instance without authentication. For team use, create a dedicated AICredits key for the LibreChat deployment and set a budget cap that matches the team plan.
Verify
In LibreChat, choose the AICredits endpoint and ask:
Say "AICredits via LibreChat" and nothing else.Check Dashboard → Usage for the request.
Troubleshooting
Endpoint not visible — Restart LibreChat and confirm the YAML file is mounted into the running container.
401 Unauthorized — Confirm AICREDITS_API_KEY is set in the same environment as the LibreChat API server.
Model error — Replace the model with an exact ID from Models.