A premium, secure, multi-provider AI chat client built with Next.js & Vanilla JS.
- Zero-Exposure Security Model: All provider calls are proxied through a secure Next.js backend. API keys never enter the browser bundle.
- Premium Aesthetics: Harmonious dark mode design, rich typography, smooth transitions, and glassmorphism details.
- Multi-Provider Support: Fully compatible with Google Gemini (direct integration) and OpenRouter (aggregating hundreds of models).
- Collapsible Reasoning/Thinking: Captures and renders thinking pipelines (e.g.,
<think>tokens from DeepSeek or reasoning parts from Gemini) inside collapsible, premium blocks. - Custom User-Defined Models: Easily add your own custom models (e.g.
nvidia/nemotron-3-super-120b-a12b:free) from the settings panel. Define the provider, friendly display name, system prompt compatibility, and reasoning support. - Multimodal File Uploads: Drag and drop text files (source code, text context) or images to extract context and interact with multimodal models.
- Localization: Native language support for both English (
EN) and Turkish (TR), togglable instantly from the sidebar. - Real-time Performance Metrics: Displays generation stats (time to complete, token count, and tokens per second).
- State Persistence: Conversations, active configurations, and custom models are automatically saved in local storage with built-in migration for legacy storage models.
- Framework: Next.js 15 (App Router)
- Frontend Logic: Vanilla JavaScript ES Modules
- Design System: Core CSS Custom Properties with Dark / Light variables
- Libraries:
marked(High-performance Markdown parser)highlight.js(Syntax highlighting for code blocks)dompurify(Safe client-side HTML sanitization)
Make sure you have Node.js (version 18 or higher) installed on your system.
git clone https://github.com/your-username/keya-wrapper.git
cd keya-wrapper
npm installCreate a .env.local file in the root directory and add your API keys:
# OpenRouter API Key
OPENROUTER_API_KEY=your_openrouter_api_key_here
# Google Gemini API Key
GEMINI_API_KEY=your_gemini_api_key_hereWarning
Do NOT prefix these keys with NEXT_PUBLIC_. Doing so will expose them to the browser client and bypass the secure backend proxy.
npm run devOpen http://localhost:3000 in your browser to experience Keya Wrapper.
To run custom models that are not included by default (like the free NVIDIA Nemotron models or new Gemini experimental weights):
- Click the Settings (gear) icon in the sidebar.
- Under the "Add Custom Model" section, fill in the details:
- Model ID: The official model identifier (e.g.,
nvidia/nemotron-3-super-120b-a12b:free). - Friendly Name: The name shown in the UI (e.g.,
Nemotron 3 Super). - Provider: Select either
OpenRouterorGoogle Gemini. - Supports System Prompt: Enable if the model accepts a system-role instructions block.
- Supports Reasoning/Thinking: Enable if the model streams chain-of-thought tokens.
- Model ID: The official model identifier (e.g.,
- Click Add Model. The model card will instantly appear grouped under the correct provider card row.
- Select the card and click Save Settings to begin using your model!
- To remove a custom model, click the Trash icon in its card.
A Dockerfile is included for easy containerization.
docker build -t keya-wrapper .docker run -p 3000:3000 \
-e OPENROUTER_API_KEY=your_key \
-e GEMINI_API_KEY=your_key \
keya-wrapperKeya Wrapper is designed to be easily deployed to Coolify or similar Node/Next.js hosting platforms:
- Select Node/Next.js buildpack or the Dockerfile build option.
- Set the destination port to
3000. - Set the build command to
npm run buildand start command tonpm run start. - Configure your environment variables
OPENROUTER_API_KEYand/orGEMINI_API_KEYunder the application settings tab.
This project is licensed under the MIT License - see the LICENSE file for details.
