How ajay-pujari/freellmapi works
FreeLLMAPI combines an OpenAI-compatible inference gateway with a management dashboard, CLI, and desktop shell. The main request path is a client request entering the server, being routed to a provider using configured keys and availability, and returning an inference result; the server also records request and quota information for management and analytics. The README documents catalog sync, custom endpoints, media, embeddings, compression, and agent setup. Some of those links are shown as unverified because their implementation call sites were not sampled.
Main entry points: app.ts HTTP App · router.ts Model Router · routes Inference Routes · providers Provider Adapters
Components 17
Inference Gateway
- HTTP App
server/src/app.ts - Inference Routes
server/src/routes - Prompt Compression
server/src/services/compression/pipeline.ts
Routing and Providers
- Model Router
server/src/services/router.ts - Provider Adapters
server/src/providers - Custom Endpoints
server/src/services/custom-endpoint.ts - Quota and Limits
server/src/services/provider-quota.ts
Management and Data
- Catalog Sync
server/src/services/catalog-sync.ts - Application Database
server/src/db/index.ts - Request Analytics
server/src/routes/analytics.ts - Key and Settings APIs
server/src/routes/keys.ts
User Interfaces
- Web Dashboard
client/src/App.tsx - Product Pages
client/src/pages - Agent Setup CLI
cli/src/index.ts - Desktop Shell
desktop/src/main.ts
Other components
- API Client
- LLM Providers
Connections 17
- API Client → HTTP App: sends requests
README.md - HTTP App → Inference Routes: mounts routes
server/src/app.ts - Inference Routes → Model Router: selects provider
- Model Router → Provider Adapters: resolves provider
server/src/services/router.ts - Provider Adapters → LLM Providers: calls inference
- Model Router → Application Database: reads routing state
server/src/services/router.ts - Model Router → Quota and Limits: checks quota
server/src/services/router.ts - Provider Adapters → Quota and Limits: records observations
server/src/providers/router9.ts - HTTP App → Key and Settings APIs: mounts routes
server/src/app.ts - HTTP App → Request Analytics: mounts routes
server/src/app.ts - Web Dashboard → Product Pages: presents features
- Web Dashboard → HTTP App: uses local API
- Agent Setup CLI → API Client: configures clients
- Desktop Shell → HTTP App: starts server
desktop/src/main.ts - Catalog Sync → Application Database: updates catalog
- Inference Routes → Prompt Compression: compresses prompts
- API Client → Custom Endpoints: configures endpoints
README.md