AICredits logo
Integrations

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:

librechat.yaml
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:

.env
AICREDITS_API_KEY=sk-your-aicredits-key

Restart 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:

NeedWhy LibreChat helps
Shared team chatMulti-user ChatGPT-style interface
Model comparisonUsers can switch between AICredits models
Admin controlCentralize provider keys and endpoint config
Agents and toolsUse 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.

On this page