explaingit

quantumnous/new-api

📈 Trending34,078GoAudience · developerComplexity · 4/5ActiveLicenseSetup · moderate

TLDR

Self-hosted AI gateway that unifies multiple LLM providers (OpenAI, Claude, Gemini, DeepSeek) behind a single endpoint with user management, billing, and quota controls.

Mindmap

mindmap
  root((repo))
    What it does
      Unified API endpoint
      Multi-provider routing
      Format translation
      Request/response conversion
    Features
      User & token management
      Per-model quotas
      Usage statistics
      Billing & recharge
    Providers supported
      OpenAI
      Claude
      Gemini
      DeepSeek
    Use cases
      Internal org gateway
      Cost control
      API reselling
      Local proxy
    Tech stack
      Go backend
      Web frontend
      Docker deployment
      SQLite/MySQL

Things people build with this

USE CASE 1

Run a centralized AI service for your organization with a single endpoint instead of managing multiple provider APIs.

USE CASE 2

Control costs by setting per-user or per-team quotas and billing rules across different LLM providers.

USE CASE 3

Resell AI API credits to customers with your own dashboard, authentication, and usage tracking.

USE CASE 4

Consolidate personal API keys from multiple providers into one local proxy for easier development.

Tech stack

GoDockerSQLiteMySQLStripeDiscordTelegramOIDC

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Docker and API keys for at least one LLM provider (OpenAI/Claude/Gemini/DeepSeek) to test the gateway.

Use it freely, but if you run it as a network service, you must release your changes to users. Strongest copyleft for SaaS.

In plain English

New API is a self-hosted AI gateway and management system written in Go that acts as a central hub for multiple large language model providers. The problem it solves is practical and common: teams or individuals use several AI services, OpenAI, Anthropic Claude, Google Gemini, DeepSeek, and others, each with its own API format, authentication scheme, and billing system. Juggling multiple API keys, usage quotas, and incompatible request formats across different applications is messy. New API sits in front of all those providers and presents a single unified endpoint, converting incoming requests between OpenAI-compatible, Claude-compatible, and Gemini-compatible formats automatically. The gateway works by accepting API calls at a single address, routing them to the appropriate backend provider based on configuration, and translating the request and response formats as needed. An admin dashboard lets you manage user accounts, assign API keys to groups, set per-model quotas, restrict which models specific tokens may use, and view usage statistics. It also handles billing, you can charge users per token consumed, set up online recharge via Stripe or EPay, and configure cache billing to avoid double-charging for repeated identical requests. Multiple authentication methods are supported, including Discord, Telegram, and OIDC single sign-on. You would use New API when running an internal AI service for an organization where you want to centralize model access behind a single endpoint, control costs per user or team, or resell AI API credits. Personal users also use it to consolidate multiple provider keys into one convenient local proxy. The tech stack is Go for the backend, with a web frontend. It is deployed via Docker and supports SQLite or MySQL for storage.

Copy-paste prompts

Prompt 1
How do I set up New API to route requests from my app to both OpenAI and Claude automatically?
Prompt 2
Show me how to configure per-user token quotas and billing in New API's admin dashboard.
Prompt 3
How can I deploy New API with Docker and connect it to my existing MySQL database?
Prompt 4
What's the process for setting up Stripe billing so users can recharge their AI credits in New API?
Prompt 5
How do I restrict certain API tokens to only use specific models in New API?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.