+
+
Back to Projects
OpenRouter
In-progressBunElysia.jsNext JS+5 more

OpenRouter

Unified AI model aggregation platform providing a single API gateway to OpenAI, Claude, and Gemini with user management, API key management, and usage analytics.

Timeline

Ongoing

Role

Full Stack

Team

Solo

Status
In-progress

Technology Stack

Bun
Elysia.js
Next JS
Tailwind CSS
TypeScript
Prisma
PostgreSQL
TanStack Query

Key Challenges

  • Multi-Provider Integration
  • API Gateway Architecture
  • Credit-Based Billing
  • Token Counting
  • Type-Safe API
  • User Authentication
  • Database Design
  • Monorepo Management

Key Learnings

  • Turborepo
  • Elysia.js Framework
  • LLM Provider SDKs
  • Prisma ORM
  • JWT Authentication
  • Eden Treaty
  • API Key Management
  • Usage Analytics

OpenRouter: Unified AI Model Aggregation Platform

Overview

OpenRouter is a unified AI model aggregation platform that provides a single API gateway to multiple Large Language Model (LLM) providers including OpenAI, Claude, and Gemini. Built with modern TypeScript technologies and designed for scalability, it offers a streamlined way to access 200+ AI models through one integration.

The Problem I Solved

Developers face several challenges when working with multiple AI models:

  • Managing multiple API keys and SDKs for different providers
  • Inconsistent API formats across providers
  • Complex billing and usage tracking
  • No unified dashboard for monitoring

OpenRouter solves this by providing one API, one dashboard, and one billing system for all AI models.

Key Features

🌐 Unified API Gateway

  • Single Endpoint: Access GPT-4, Claude, Gemini, and more through one API
  • OpenAI-Compatible: Drop-in replacement — just change the base URL
  • Smart Routing: Automatic failover and intelligent model routing

👥 User Management

  • Authentication: Secure JWT-based user authentication
  • API Keys: Generate and manage multiple API keys per user
  • Credit System: Track usage and manage credits for API consumption

📊 Usage Analytics

  • Dashboard: Intuitive React-based dashboard for monitoring
  • Token Tracking: Track conversations, token counts, and credit consumption
  • Cost Optimization: Monitor spending across all API keys

Technical Highlights

Monorepo Architecture

Built with Turborepo containing:

  • api-backend: LLM aggregation service for routing requests
  • main-backend: Core business logic with Elysia.js
  • frontend-dashboard: React 19 web interface
  • Shared packages for database and configurations

Tech Stack

  • Runtime: Bun - Fast all-in-one JavaScript runtime
  • Backend: Elysia.js - Ergonomic web framework for Bun
  • Frontend: React 19 with TanStack Query
  • Database: PostgreSQL with Prisma ORM
  • Type Safety: Eden Treaty for end-to-end type safety

LLM Integration

Implemented provider adapters for:

  • OpenAI (GPT-4, GPT-3.5-turbo)
  • Anthropic (Claude 3 Opus, Sonnet)
  • Google (Gemini Pro)

Use Cases

Perfect for:

  • Quick Team Syncs: Share a link, discuss, and done
  • Sensitive Discussions: Share credentials or keys securely
  • Casual Chats: Spontaneous conversations without commitment
  • Privacy Enthusiasts: Communication without the tracking
+
+

Design & Developed by dev0jha
© 2026. All rights reserved.