How lov0u/freellmapi works
FreeLLMAPI aggregates free and custom model providers behind a unified API, with a dashboard and desktop app for setup and administration. The main workflow is a client request entering the server, being routed to an available provider, and returning through a compatible API. The README also documents catalog updates, prompt compression, analytics, media and embedding endpoints, and CLI setup tools. The graph uses README and SOURCE INDEX evidence; several route and integration details are unsampled, so their links are limited to documented relationships.
Main entry points: router.ts Model router · app.ts HTTP application · main.ts Desktop app · base.ts Provider adapters
Components 24
API and routing
- HTTP application
server/src/app.ts - Unified proxy
server/src/routes/proxy.ts - Responses API
server/src/routes/responses.ts - Anthropic API
server/src/routes/anthropic.ts - Model router
server/src/services/router.ts - Provider adapters
server/src/providers/base.ts - Google adapter
server/src/providers/google.ts - Proxy transport
server/src/lib/proxy.ts
Keys and catalog
- Key management
server/src/routes/keys.ts - Key encryption
server/src/lib/crypto.ts - SQLite state
server/src/db/index.ts - Catalog sync
server/src/services/catalog-sync.ts - Custom endpoints
server/src/services/custom-endpoint.ts - Quota tracking
server/src/services/ratelimit.ts
Product capabilities
- Prompt compression
server/src/services/compression/pipeline.ts - Embeddings
server/src/routes/embeddings.ts - Usage analytics
server/src/routes/analytics.ts - Error classification
server/src/lib/error-classify.ts
User interfaces
- Web dashboard
client/src/App.tsx - Setup CLI
cli/src/index.ts - Desktop app
desktop/src/main.ts - Tray popover
desktop/src/popover.ts - Desktop localization
desktop/src/i18n.ts
Other components
- API client
Connections 25
- API client → HTTP application: sends requests
README.md - HTTP application → Unified proxy: mounts route
server/src/app.ts - HTTP application → Responses API: mounts route
server/src/app.ts - HTTP application → Anthropic API: mounts route
server/src/app.ts - Unified proxy → Model router: dispatches requests
- Responses API → Model router: dispatches requests
- Anthropic API → Model router: dispatches requests
- Model router → Provider adapters: resolves provider
server/src/services/router.ts - Model router → Quota tracking: checks quota
server/src/services/router.ts - Provider adapters → Google adapter: includes adapter
server/src/providers/index.ts - Provider adapters → Proxy transport: uses transport
- Key management → Key encryption: encrypts keys
- Key management → SQLite state: stores key data
- Model router → SQLite state: reads routing state
server/src/services/router.ts - Catalog sync → SQLite state: updates catalog
- Custom endpoints → Key encryption: uses encryption
server/src/services/custom-endpoint.ts - Embeddings → Custom endpoints: resolves custom endpoint
server/src/routes/embeddings.ts - Prompt compression → API client: compresses prompts
README.md - Usage analytics → API client: reports usage
README.md - Error classification → Model router: classifies failures
server/src/services/router.ts - Web dashboard → HTTP application: administers service
- Setup CLI → API client: configures clients
README.md - Desktop app → HTTP application: hosts dashboard
desktop/src/main.ts - Desktop app → Tray popover: opens popover
desktop/src/main.ts - Desktop app → Desktop localization: normalizes locale
desktop/src/main.ts