About this project

CoAI (formerly Chat Nio) is an open-source, self-hosted platform that combines a consumer-facing AI chat application with an OpenAI-compatible API gateway and distribution system, aimed at operators who want to serve both end users and developers from a single deployment. Model and provider support: The gateway integrates a range of providers and formats, including OpenAI and Azure OpenAI, Anthropic Claude, Google Gemini and PaLM2, Midjourney (with U/V/R actions), iFlytek SparkDesk, Zhipu ChatGLM, Alibaba Tongyi Qianwen, Tencent Hunyuan, Baichuan, Moonshot, DeepSeek, ByteDance Skylark, Groq, OpenRouter, 360 GPT, and local runtimes such as LocalAI and Ollama. Text-to-image support covers DALL-E, Midjourney, and Stable Diffusion. The repository description states support for 200+ models across 35+ providers. Gateway and channel management: Channels can be configured with priority ordering, weight-based load balancing within the same priority, user grouping, automatic retry on failure, model redirection, upstream hiding, and channel status management. Exposed OpenAI-compatible endpoints include /v1/chat/completions, /v1/images, /v1/models, and /v1/billing. Chat and end-user features: The web UI (React, Redux, Radix UI, Tailwind CSS) is responsive across PC, tablet, and mobile, with light and dark themes and multi-language internationalization. Markdown rendering covers LaTeX formulas, Mermaid diagrams, tables, code highlighting, and charts. Conversations sync across devices without WebDAV or WebRTC dependencies and can be shared via links or saved as images. A customizable model marketplace and preset system (with cloud sync) is managed from the backend. A PWA build and a Tauri-based desktop app are available. Files and search: File parsing works out of the box for PDF, DOCX, PPTX, Excel, and image formats across all models, with OCR and cloud object storage (S3, R2, MinIO) handled through a companion blob service. Web search is built on the SearXNG engine, supporting sources such as Google, Bing, DuckDuckGo, Yahoo, Wikipedia, Arxiv, and Qwant, with safe-search mode, content truncation, and image proxy options. Billing and administration: Two billing modes are offered: subscriptions and elastic billing (per-request, per-token, free, or anonymous calls, with minimum request point checks). Gift codes and redemption codes support batch generation for promotions or card sales. The admin backend includes dashboards, announcement and notification management, user and subscription management, price settings, custom site name and logo, and SMTP configuration. An optional model cache returns previously computed results for identical request parameter hashes without billing the cache hit, with configurable cache duration and result counts. Deployment: Docker and Docker Compose are the recommended install paths (requiring MySQL and Redis), with one-click options for Zeabur, BTPanel, and Alibaba Cloud ComputeNest, plus building from source using pnpm for the frontend and Go for the backend. The initial admin account is root with a default password that should be changed immediately after deployment. The project is licensed under Apache-2.0. A separate commercial Pro edition adds features such as TTS/STT, a plugin marketplace, RAG knowledge base, additional payment providers, and channel health monitoring; those capabilities are not part of the open-source repository.