explaingit

coaidev/coai

9,164TypeScriptAudience · developerComplexity · 4/5LicenseSetup · hard

TLDR

A self-hosted AI chat platform supporting 200-plus language models from 35-plus providers, with built-in subscription billing, multi-tenant management, image generation, file uploads, and an OpenAI-compatible API layer.

Mindmap

mindmap
  root((CoAI))
    What it does
      Self-hosted AI chat
      200 plus models
    User Features
      Chat interface
      Image generation
      File uploads
    Operator Features
      Billing management
      Channel routing
      Model marketplace
    Tech
      OpenAI compatible API
      SearXNG web search
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Deploy your own AI chat service and charge users via subscription or per-model usage billing across 200-plus language models.

USE CASE 2

Route AI requests across multiple provider API keys with automatic failover when a channel goes down.

USE CASE 3

Let users upload PDFs, Word, or Excel files and chat with AI about their content through your hosted platform.

USE CASE 4

Point existing OpenAI-compatible developer tools at your self-hosted CoAI instance to route them through preferred providers.

Tech stack

TypeScriptDockerSearXNG

Getting it running

Difficulty · hard Time to first run · 1h+

Requires self-hosted infrastructure and separate API keys for each AI provider you want to connect.

Use freely for any purpose, including commercial use, as long as you include the Apache-2.0 license notice.

In plain English

CoAI.Dev is a self-hosted platform for running an AI chat service with support for over 200 language models from more than 35 providers. You deploy it on your own infrastructure, and it handles serving a chat interface to users, routing requests to AI providers, and managing billing, all in one package. On the user side, people get a chat interface for conversations with text, image generation (through models like DALL-E or Midjourney), and file uploads covering PDF, Word, Excel, PowerPoint, and image formats. Responses can include formatted text with math formulas, code with syntax highlighting, charts, and mind maps. Conversations sync across devices and can be shared as links or saved as images. On the operator side, the platform is built for running a multi-tenant business. You can charge users through subscriptions or usage-based billing, manage gift codes and redemption codes, control which models appear in the user-facing marketplace, set prices per model, and configure site branding. A built-in dashboard shows usage, costs, and user activity. Channel management is where the platform handles backend routing complexity. You configure multiple API keys for the same or different providers, assign priorities, and set weights for load distribution. If a channel fails, the system retries automatically with another. This lets an operator work with several AI providers simultaneously and switch around failures without manual intervention. Other built-in capabilities include a response cache (repeated identical requests return a stored result and are not billed again), web search powered by the open-source SearXNG engine with support for Google, Bing, DuckDuckGo, and others, and an OpenAI-compatible API output layer so developers can point their existing tools at the self-hosted instance. A commercial Pro version with additional features is available separately. The open-source version is licensed under Apache-2.0.

Copy-paste prompts

Prompt 1
Help me deploy CoAI on my own server. What Docker configuration do I need and how do I add my first AI provider channel?
Prompt 2
Show me how to configure multi-provider load balancing in CoAI so requests route across OpenAI and Anthropic keys with failover.
Prompt 3
How do I set up CoAI's billing system to charge users different rates per model with subscription and usage-based tiers?
Prompt 4
I want to enable web search in CoAI using SearXNG with Google and DuckDuckGo. Walk me through the configuration.
Open on GitHub → Explain another repo

← coaidev on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.