freshcrate
Skin:/

coai

🚀 Next Generation Multi-tenant AI One-Stop Solution. Builtin Admin & Billing System. Enterprise-Grade Unified LLM Gateway Support for 200+ Models And 35+ Providers, Load Balacing w/ Priority-base Rou

Why this rank:Strong adoptionHealthy release cadenceRelease freshness

Description

🚀 Next Generation Multi-tenant AI One-Stop Solution. Builtin Admin & Billing System. Enterprise-Grade Unified LLM Gateway Support for 200+ Models And 35+ Providers, Load Balacing w/ Priority-base Routing, Cost Management, Chat Share, Cloud Sync, Credit/Subscription Billing, All File Parsing, Web Search, Built-in Model Cache.

README

chatnio

🚀 Next Generation AIGC One-Stop Business Solution

"CoAI.Dev > Next Web + One API"

English · 简体中文 · 日本語 · Docs · Discord · Deployment Guide

CoAI.Dev: #1 Repo Of The Day

CoAI.Dev Preview

📝 Features

  1. 🤖️ Rich Model Support: Multi-model service provider support (OpenAI / Anthropic / Gemini / Midjourney and more than ten compatible formats & private LLM support)
  2. 🤯 Beautiful UI Design: UI compatible with PC / Pad / Mobile, following Shadcn UI & Tremor Charts design standards, rich and beautiful interface design and backend dashboard
  3. 🎃 Complete Markdown Support: Support for LaTeX formulas / Mermaid mind maps / table rendering / code highlighting / chart drawing / progress bars and other advanced Markdown syntax support
  4. 👀 Multi-theme Support: Support for multiple theme switching, including Light Mode for light themes and Dark Mode for dark themes. 👉 Custom Color Scheme
  5. 📚 Internationalization Support: Support for internationalization, multi-language switching 🇨🇳 🇺🇸 🇯🇵 🇷🇺 👉 Welcome to contribute translations Pull Request
  6. 🎨 Text-to-Image Support: Support for multiple text-to-image models: OpenAI DALL-E✅ & Midjourney (support for U/V/R operations)✅ & Stable Diffusion✅ etc.
  7. 📡 Powerful Conversation Sync: Zero-cost cross-device conversation sync support for users, support for conversation sharing (link sharing & save as image & share management), no need for WebDav / WebRTC and other dependencies and complex learning costs
  8. 🎈 Model Market & Preset System: Support for customizable model market in the backend, providing model introductions, tags, and other parameters. Site owners can customize model introductions according to the situation. Also supports a preset system, including custom presets and cloud synchronization functions.
  9. 📖 Rich File Parsing: Out-of-the-box, supports file parsing for all models (PDF / Docx / Pptx / Excel / image formats parsing), supports more cloud image storage solutions (S3 / R2 / MinIO etc.), supports OCR image recognition 👉 See project CoAI.Dev Blob Service for details (supports Vercel / Docker one-click deployment)
  10. 🌏 Full Model Internet Search: Based on the SearXNG open-source engine, supports rich search engines such as Google / Bing / DuckDuckGo / Yahoo / Wikipedia / Arxiv / Qwant, supports safe search mode, content truncation, image proxy, test search availability, and other functions.
  11. 💕 Progressive Web App (PWA): Supports PWA applications & desktop support (desktop based on Tauri)
  12. 🤩 Comprehensive Backend Management: Supports beautiful and rich dashboard, announcement & notification management, user management, subscription management, gift code & redemption code management, price setting, subscription setting, custom model market, custom site name & logo, SMTP email settings, and other functions
  13. 🤑 Multiple Billing Methods: Supports 💴 Subscription and 💴 Elastic Billing two billing methods. Elastic billing supports per-request billing / token billing / no billing / anonymous calls and minimum request points detection and other powerful features
  14. 🎉 Innovative Model Caching: Supports enabling model caching: i.e., under the same request parameter hash, if it has been requested before, it will directly return the cached result (hitting the cache will not be billed), reducing the number of requests. You can customize whether to cache models, cache time, multiple cache result numbers, and other advanced cache settings
  15. 🥪 Additional Features (Support Discontinued): 🍎 AI Project Generator Function / 📂 Batch Article Generation Function / 🥪 AI Card Function (Deprecated)
  16. 😎 Excellent Channel Management: Self-written excellent channel algorithm, supports ⚡ multi-channel management, supports 🥳priority setting for channel call order, supports 🥳weight setting for load balancing probability distribution of channels at the same priority, supports 🥳user grouping, 🥳automatic retry on failure, 🥳model redirection, 🥳built-in upstream hiding, 🥳channel status management and other powerful enterprise-level functions
  17. OpenAI API Distribution & Proxy System: Supports calling various large models in OpenAI API standard format, integrates powerful channel management functions, only needs to deploy one site to achieve simultaneous development of B/C-end business💖
  18. 👌 Quick Upstream Synchronization: Channel settings, model market, price settings, and other settings can quickly synchronize with upstream sites, modify your site configuration based on this, quickly build your site, save time and effort, one-click synchronization, quick launch
  19. 👋 SEO Optimization: Supports SEO optimization, supports custom site name, site logo, and other SEO optimization settings to make search engines crawl faster, making your site stand out👋
  20. 🎫 Multiple Redemption Code Systems: Supports multiple redemption code systems, supports gift codes and redemption codes, supports batch generation, gift codes are suitable for promotional distribution, redemption codes are suitable for card sales, for gift codes of one type, a user can only redeem one code, which to some extent reduces the situation of one user redeeming multiple times in promotions😀
  21. 🥰 Business-Friendly License: Adopts the Apache-2.0 open-source license, friendly for commercial secondary development & distribution (please also comply with the provisions of the Apache-2.0 license, do not use for illegal purposes)

✨ CoAI.Dev Business

Pro Version Preview

  • ✅ Beautiful commercial-grade UI, elegant frontend interface and backend management
  • ✅ Supports TTS & STT, plugin marketplace, RAG knowledge base and other rich features and modules
  • ✅ More payment providers, more billing models and advanced order management
  • ✅ Supports more authentication methods, including SMS login, OAuth login, etc.
  • ✅ Supports model monitoring, channel health detection, fault alarm automatic channel switching
  • ✅ Supports multi-tenant API Key distribution system, enterprise-level token permission management and visitor restrictions
  • ✅ Supports security auditing, logging, model rate limiting, API Gateway and other advanced features
  • ✅ Supports promotion rewards, professional data statistics, user profile analysis and other business analysis capabilities
  • ✅ Supports Discord/Telegram/Feishu and other bot integration capabilities (extension modules)
  • ...

👉 Learn More

🔨 Supported Models

  1. OpenAI & Azure OpenAI (✅ Vision ✅ Function Calling)
  2. Anthropic Claude (✅ Vision ✅ Function Calling)
  3. Google Gemini & PaLM2 (✅ Vision)
  4. Midjourney (✅ Mode Toggling ✅ U/V/R Actions)
  5. iFlytek SparkDesk (✅ Vision ✅ Function Calling)
  6. Zhipu AI ChatGLM (✅ Vision)
  7. Alibaba Tongyi Qwen
  8. Tencent Hunyuan
  9. Baichuan AI
  10. Moonshot AI (👉 OpenAI)
  11. DeepSeek AI (👉 OpenAI)
  12. ByteDance Skylark (✅ Function Calling)
  13. Groq Cloud AI
  14. OpenRouter (👉 OpenAI)
  15. 360 GPT
  16. LocalAI / Ollama (👉 OpenAI)

👻 OpenAI Compatible API Proxy

  • Chat Completions (/v1/chat/completions)
  • Image Generation (/v1/images)
  • Model List (/v1/models)
  • Dashboard Billing (/v1/billing)

📦 Deployment

Tip

After successful deployment, the admin account is root, with the default password chatnio123456

✨ Zeabur (One-Click)

Deploy on Zeabur

Zeabur provides a certain free quota, you can use non-paid regions for one-click deployment, and also supports plan subscriptions and elastic billing for flexible expansion.

  1. Click Deploy to deploy, and enter the domain name you wish to bind, wait for the deployment to complete.
  2. After deployment is complete, please visit your domain name and log in to the backend management using the username root and password chatnio123456. Please follow the prompts to change the password in the chatnio backend in a timely manner.

🐳 BTPanel (One-Click)

  1. Install Baota Panel by visiting BTPanel and install using the stable version script.
  2. Log in to the panel and click Docker on the left to enter Docker management.
  3. If prompted that Docker / Docker Compose is not installed, you can install according to the guide above.
  4. After installation is complete, enter App Store, search for CoAI and click Install.
  5. Configure basic application information such as your domain name, port, etc., and click Confirm (default configuration can be used).
  6. First-time installation may take 1-2 minutes to complete database initialization. If you encounter issues, please check the panel running logs for troubleshooting.
  7. Visit your configured domain or server http://[ip]:[port], log in to the backend management using username root and password chatnio123456.

AlibabaCloud ComputeNest (One-Click)

Deploy on AlibabaCloud ComputeNest International Edition

  1. Access the CoAI service on ComputeNest International Edition. If you are in China, please visit ComputeNest, and fill in the deployment parameters as prompted.
  2. Select the payment type, fill in the instance parameters and network parameters, and click Next: Confirm Order.
  3. After confirming the deployment parameters and checking the estimated price, click Create Now and wait for the service instance to be deployed.
  4. Click Service Instance on the left. After the service instance is deployed, click the instance ID to enter the details interface.
  5. Click the address in Use Now on the details interface to enter the CoAI interface. The default username is root and the password is chatnio123456 to log in to the backend management.
  6. For more operation details and payment information, see:Service Details.

⚡ Docker Compose Installation (Recommended)

Note

After successful execution, the host machine mapping address is http://localhost:8000

git clone --depth=1 --branch=main --single-branch https://github.com/coaidev/coai.git
cd chatnio
docker-compose up -d # Run the service
# To use the stable version, use docker-compose -f docker-compose.stable.yaml up -d instead
# To use Watchtower for automatic updates, use docker-compose -f docker-compose.watch.yaml up -d instead

Version update (If Watchtower automatic updates are enabled, manual updates are not necessary):

docker-compose down 
docker-compose pull
docker-compose up -d
  • MySQL database mount directory: ~/db
  • Redis database mount directory: ~/redis
  • Configuration file mount directory: ~/config

⚡ Docker Installation (Lightweight runtime, commonly used for external MYSQL/RDS services)

Note

After successful execution, the host machine address is http://localhost:8094.

To use the stable version, use programzmh/chatnio:stable instead of programzmh/chatnio:latest

docker run -d --name chatnio \
   --network host \
   -v ~/config:/config \
   -v ~/logs:/logs \
   -v ~/storage:/storage \
   -e MYSQL_HOST=localhost \
   -e MYSQL_PORT=3306 \
   -e MYSQL_DB=chatnio \
   -e MYSQL_USER=root \
   -e MYSQL_PASSWORD=chatnio123456 \
   -e REDIS_HOST=localhost \
   -e REDIS_PORT=6379 \
   -e SECRET=secret \
   -e SERVE_STATIC=true \
   programzmh/chatnio:latest
  • --network host means using the host machine's network, allowing the Docker container to use the host's network. You can modify this as needed.
  • SECRET: JWT secret key, generate a random string and modify accordingly
  • SERVE_STATIC: Whether to enable static file serving (normally this doesn't need to be changed, see FAQ below for details)
  • -v ~/config:/config mounts the configuration file, -v ~/logs:/logs mounts the host machine directory for log files, -v ~/storage:/storage mounts the directory for additional feature generated files
  • MySQL and Redis services need to be configured. Please refer to the information above to modify the environment variables accordingly

Version update (After enabling Watchtower, manual updates are not necessary. After execution, follow the steps above to run again):

docker stop chatnio
docker rm chatnio
docker pull programzmh/chatnio:latest

⚒ Compile and Install

Note

After successful deployment, the default port is 8094, and the access address is http://localhost:8094

Config settings (~/config/config.yaml) can be overridden using environment variables. For example, the MYSQL_HOST environment variable can override the mysql.host configuration item

git clone https://github.com/coaidev/coai.git
cd chatnio

cd app
npm install -g pnpm
pnpm install
pnpm build

cd ..
go build -o chatnio

# e.g. using nohup (you can also use systemd or other service manager)
nohup ./chatnio > output.log & # using nohup to run in background

📦 Tech Stack

  • 🥗 Frontend: React + Redux + Radix UI + Tailwind CSS
  • 🍎 Backend: Golang + Gin + Redis + MySQL
  • 🍒 Application Technology: PWA + WebSocket

🤯 Why Create This Project & Project Advantages

  • We found that most AIGC commercial sites on the market are frontend-oriented lightweight deployment projects with beautiful UI interface designs, such as the commercial version of Next Chat. Due to its personal privatization-oriented design, there are some limitations in secondary commercial development, presenting some issues, such as:

    1. Difficult conversation synchronization, for example, requiring services like WebDav, high user learning costs, and difficulties in real-time cross-device synchronization.
    2. Insufficient billing, for example, only supporting elastic billing or only subscription-based, unable to meet the needs of different users.
    3. Inconvenient file parsing, for example, only supporting uploading images to an image hosting service first, then returning to the site to input the URL direct link in the input box, without built-in file parsing functionality.
    4. No support for conversation URL sharing, for example, only supporting conversation screenshot sharing, unable to support conversation URL sharing (or only supporting tools like ShareGPT, which cannot promote the site).
    5. Insufficient channel management, for example, the backend only supports OpenAI format channels, making it difficult to be compatible with other format channels. And only one channel can be filled in, unable to support multi-channel management.
    6. No API call support, for example, only supporting user interface calls, unable to support API proxying and management.
  • Another type is API distribution-oriented sites with powerful distribution systems, such as projects based on One API. Although these projects support powerful API proxying and management, they lack interface design and some C-end features, such as:

    1. Insufficient user interface, for example, only supporting API calls, without built-in user interface chat. User interface chat requires manually copying the key and going to other sites to use, which has a high learning cost for ordinary users.
    2. No subscription system, for example, only supporting elastic billing, lacking billing design for C-end users, unable to meet different user needs, and not user-friendly in terms of cost perception for users without a foundation.
    3. Insufficient C-end features, for example, only supporting API calls, not supporting conversation synchronization, conversation sharing, file parsing, and other functions.
    4. Insufficient load balancing, the open-source version does not support the weight parameter, unable to achieve balanced load distribution probability for channels at the same priority (New API also solves this pain point, with a more beautiful UI).

Therefore, we hope to combine the advantages of these two types of projects to create a project that has both a powerful API distribution system and a rich user interface design, thus meeting the needs of C-end users while developing B-end business, improving user experience, reducing user learning costs, and increasing user stickiness.

Thus, CoAI.Dev was born. We hope to create a project that has both a powerful API distribution system and a rich user interface design, becoming the next-generation open-source AIGC project's one-stop commercial solution.

❤ Donations

If you find this project helpful, you can give it a Star to show your support!

Release History

VersionChangesUrgencyDate
v4.0.0# CoAI v4.0.0 Release Notes We are excited to announce the official release of **CoAI v4.0.0**! This is a major, milestone update focused on the refactoring of the backend management system and the enhancement of core data analysis capabilities, alongside numerous features and fixes contributed by the community. ## 🚀 Highlights ### 📊 Comprehensive Data Analysis Capabilities This update introduces a brand-new backend data analysis module, elevating the statistical granularity from dLow10/23/2025
v3.11.1## What's Changed * fix enter send message on macos by @yongman in https://github.com/coaidev/coai/pull/151 * claude sys msg adapt by @Lavanille777 in https://github.com/coaidev/coai/pull/152 * fix: skip the first claude system message by @Lavanille777 in https://github.com/coaidev/coai/pull/154 * 支持MySql tls连接 by @navee in https://github.com/coaidev/coai/pull/168 * feat: support model `gpt-4o` and `gpt-4o-2024-05-13` by @XiaomaiTX in https://github.com/coaidev/coai/pull/196 * feat: add `gLow1/20/2025
v3.10## v3.10 - feat: support unforced smtp registration 支持非强制 SMTP 发件注册 ([#42](https://github.com/Deeptrain-Community/chatnio/issues/42)) - feat: support edit message and delete message 支持编辑和删除消息 ([#51](https://github.com/Deeptrain-Community/chatnio/issues/51)) - feat: update file uploader and add auto copy file feature in chat input 支持输入框 Ctrl+V 复制图片 (#61) - feat: support file viewer 支持上传文件查看 (#61) - feat: suppport customize temperature, top_p, top_k params 支持自定义温度, TopP, TopK 等参数 (#61) - feaLow3/10/2024
v3.9## v3.9 - 支持用户初始点数设置 (#41) - 支持站点公告 (#49) 滚动查看 (#57) 及手动翻阅 (#58) - 支持渠道管理对接上游 (#52) - 支持模型市场同步上游 (#50) - 支持计费规则同步上游 (可选是否覆盖已有规则) (#39) - 支持注册域名邮箱白名单 (#53) - 支持购买链接(发卡链接)自定义 (#54) - 支持用户类型占比图表和模型使用图表 (#59) - 优化 Docker 容器大小 (Multi-Stage Build) 和 ARM64 架构兼容 (BuildX) (#37) Low1/25/2024
v3.8## 3.8 - ⭐ 新增模型市场(自定义设置模型名,模型请求 id,简介,标签,模型图像,参数,支持拖拽放置改变顺序,增删改查,自动绑定计费设置,自动同步更新) - ⭐ 新增订阅管理(是否开启订阅,订阅价格,订阅物品 ID,显示名称,次数配额,勾选模型 - 自动绑定渠道已设置模型和常见模型列表,图标列表,上移下移,支持导入已设置的物品类型) - ⭐ 新增服务日志(控制台,历史日志文件下载 查看,日志切片和定时清理 - 默认30d) - 支持重置 API Key 功能 - 支持上传图片预览功能 - 优化移动端管理页面 UI - 支持自定义文档地址 - 支持自定义文件解析服务Low1/18/2024
v3.7## 3.7 - ⭐ 支持 All in one 模式(当前可选 Deeptrain 模式 - 微信支付宝官方支付方式和 all in one 模式 - 发卡支付模式) - ⭐ 支持渠道管理功能(优先级,权重,用户分组,模型映射,最大重试次数,接入点设置等) - ⭐ 支持 DuckDuckGo API 快速联网搜索功能(未设置时使用较慢的 Bing / WebPilot 搜索逆向) - ⭐ 支持自定义计费设置(支持按 Token 计费,按次计费,不计费,是否支持匿名调用等) - ⭐ 支持模型市场模型拖拽放置,偏好模型顺序自定义 - ⭐ 新增后台系统设置(SMTP 发件,联网设置,自定义网站名称,网站 Logo 等) - 更新偏好设置页面 (新增自定义发送键,最大历史会话数,语言设置) - 新增日语语言适配 - 新增 Azure, Gemini 格式 - 增加鲁棒性响应截获Low1/4/2024
v3.6## 3.6 - 新增后台管理(仪表盘,用户设置,兑换码。公告设置等) - 新增偏好设置 - 新增模型市场 - 新增预设功能 - 新增公告功能 - 新增订阅分层 - 新增批量文章生成功能 - 新增 GPT 4 Vision (*gpt-4-vision-preview*) 适配和图像 Token 计费 - 新增 Function Calling 适配 - 新增 DALLE-3 模型 - 新增 通义千问 模型 - 新增 ChatGLM3 Turbo 模型 - 新增 腾讯混元 模型 - 新增 360智脑 模型 - 新增 百川AI 模型 - 新增 抖音豆包 模型 - 新增 Stable Diffusion XL, LLaMa2, Code LLaMa 等 LocalLLM 模型 - 新增 Midjourney 模型(适配 Relax, Fast, Turbo模式) - 更新 文件上传 功能(支持文本类型,pdf, pptx, docx, xlsx, 图片等格式) - 更新命令行操作 - 优化兼容层重试/均衡负载机制 - 优化停止操作 - 优化文本Low11/28/2023
v3.5## 3.5 - 浏览器兼容性适配 - 更新模型选择器(标签,移动端适配) - 分享对话管理功能 - 增加一键删除全部对话功能 - 修整冗余,前端广播触发策略更新 - 修复 Redux Dispatch 渲染上屏问题 - 修复 ChatGPT, Claude 卡字漏字问题 - 增加保留历史对话的使用模型功能 - 增加邀请码功能 - 增加侧边栏用户区域 - 更新缓存策略 - 更新 SSE 接收策略,提升并发速度 - 修复移动端提示通知无法自动消失问题 - 修复移动端重叠选择器重复触发问题 - 增加 Markdown XLink 功能 - 增加代码复制功能,以及右键区域复制功能 - 修复 Service Worker Manifest 被缓存而无法及时 PWA 更新的问题 - 增加订阅使用量情况信息显示 - 增加版本号显示和 PWA 自动安装到桌面功能(浏览器实验功能) - 增加 Safari 浏览器支持 - 增加更便捷的移动端新建对话动作 - 更新 Claude 100k 用户配额策略 - 增加未发送输入框消息复原功能(防止误触刷新,pwLow10/29/2023
v3.4## 3.4 1. 对话分享功能 2. 模型选择器更新 3. 实现 **停止**,**重新询问** 等动作 4. 增加对 *chronium 66 ~ 84* 的浏览器适配 Low10/22/2023
v3.3## 3.3 1. Key 中转服务 2. Service Worker 自动更新功能 3. Markdown 编辑器 4. 新增模型适配: - New Bing (unstable) - Creative - Balanced - Precise Low10/5/2023
v3.2## 3.2 新增模型适配: - PaLM2 - Anthropic Claude - Claude 2 - Claude 2 100k Low10/1/2023
v3.1## 3.1 新增模型适配: - Claude Slack - SparkDesk 讯飞星火大模型 - v1.5 - v2.0Low9/30/2023
v3.0## v3 Golang 后端重构 - Adapter 适配层 - Websocket 协程 提升并发 - API 规范 - 接口并发数限制 - 缓存机制 - Tiktoken 权重计费 Low9/29/2023
v2.1## v2.1 - GPT-4 Token 计费系统 - PWA 应用 - 移动端适配更新 Low9/8/2023
v2.0## v2.0 使用 react + tailwind css + redux 重构 - 更好的渲染性能和首屏加载时间 - IE9 支持 - 动画更新 - 国际化 - Markdown 渲染性能提升 - 明暗主题切换 - 使用 Redux 维持状态生命周期 - 后端 http2 stream 多路复用Low9/6/2023

Dependencies & License Audit

Loading dependencies...

Similar Packages

copilot-api🚀 Access the reverse-engineered GitHub Copilot API through this proxy, enabling streamlined integration for your development needs.main@2026-06-01
APIParkCloud native, ultra-high performance AI&API gateway, LLM API management, distribution system, open platform, supporting all AI APIs.🦄云原生、超高性能 AI&API网关,LLM API 管理、分发系统、开放平台,支持所有AI API,不限于OpenAI、Azure、v1.9.6-beta
claude-blocker🛡️ Block distracting websites when Claude Code is in use, ensuring focused work sessions and minimizing interruptions.main@2026-06-07
lobehubThe ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effov2.2.2
planoPlano is an AI-native proxy and data plane for agentic apps — with built-in orchestration, safety, observability, and smart LLM routing so you stay focused on your agents core logic.0.4.23

More in Infrastructure

tensorzeroTensorZero is an open-source LLMOps platform that unifies an LLM gateway, observability, evaluation, optimization, and experimentation.
modelsThis repository contains comprehensive pricing and configuration data for LLMs. It powers cost attribution for 200+ enterprises running 400B+ tokens through Portkey AI Gateway every day.
patent_mcp_serverFastMCP Server for USPTO data
planoPlano is an AI-native proxy and data plane for agentic apps — with built-in orchestration, safety, observability, and smart LLM routing so you stay focused on your agents core logic.