Status: [UNTESTED] Endpoints found: http://localhost:3000/v1/chat/completions http://localhost:3000/v1/models Source: https://github.com/khushaljethava/freellm-crm # FreeLLM CRM Self-hosted CRM and OpenAI-compatible gateway for free LLM providers from [freellm-apis](https://github.com/khushaljethava/freellm-apis). 1. Configure upstream provider API keys in the dashboard 2. Issue local `sk-…` keys for your apps 3. Call a single `/v1` endpoint — omit `model` for random provider + failover, or pass `model` to pin a route ## Quick start (Docker) ```bash cp .env.example .env # Set strong ADMIN_PASSWORD, ENCRYPTION_KEY, SESSION_SECRET (≥32 chars) docker compose up --build ``` Open http://localhost:3000 and sign in with `ADMIN_EMAIL` / `ADMIN_PASSWORD`. Then: 1. **Providers** — open Configure (modal), add one or more API keys for rotation, set `extra_json` if needed, enable 2. **API Keys** — create a local key (shown once) 3. Call `/v1/chat/completions` with that key ## Local development ```bash cd web cp .env.example .env.local npm install npm run self-check npm run dev ``` App: http://localhost:3000 · Health: `GET /api/health` ## Environment | Variable | Purpose | |----------|---------| | `ADMIN_EMAIL` / `ADMIN_PASSWORD` | First admin (bootstrapped on startup) | | `ENCRYPTION_KEY` | Encrypts provider keys at rest (min 16 chars) | | `SESSION_SECRET` | Dashboard session cookie (min 32 chars) | | `DATABASE_URL` | SQLite path (default `./data/freellm.db`) | ## Client usage **Auth:** `Authorization: Bearer sk-…` (local key from the dashboard) is always required. ### Auto routing (omit `model`) Shuffles enabled providers that have a catalog model, tries until one succeeds. Falls back on network errors and `401` / `403` / `404` / `429` / `5xx`. Does not fall back on `400`. ```bash curl --location 'http://localhost:3000/v1/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sk-YOUR_LOCAL_KEY' \ --data '{ "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of Fr