About this project

New API is a self-hosted gateway and management system for large language model APIs, positioned as a next-generation successor to the One API project. It aggregates many upstream model providers behind a single endpoint and normalizes their differing request/response formats, so clients can talk to one API surface while the gateway handles the translation. Core capabilities described in the README: - Format conversion: OpenAI-compatible ⇄ Claude Messages, OpenAI-compatible → Google Gemini, and Gemini → OpenAI-compatible (text only, function calling not yet supported). OpenAI Responses conversion is listed as in development. A "thinking-to-content" feature is also mentioned. - Interface coverage: chat completions, Responses, images, audio, video, embeddings, rerank (Cohere, Jina), realtime sessions (including Azure), Claude Messages and Google Gemini chat. Midjourney-Proxy, Suno API and Dify ChatFlow are also listed as supported upstream types, plus configurable custom upstream endpoints. - Routing and reliability: channel weighted random selection, automatic retry on failure, and user-level model rate limiting. - Reasoning effort controls: model-name suffixes such as -high/-medium/-low for OpenAI o-series and GPT-5, a -thinking variant for Claude, and thinking/nothinking plus budget suffixes for Gemini models. - Accounts and access: token grouping, model restrictions, user management, and authorization login via Discord, LinuxDO, Telegram and OIDC. A companion key-quota query tool is referenced. - Accounting: internal top-up and quota allocation via EPay and Stripe, per-request and usage-based cost accounting, and cache-hit billing statistics for providers such as OpenAI, Azure, DeepSeek, Claude and Qwen. - Operations: a visual dashboard with statistics, multi-language UI (Simplified/Traditional Chinese, English, French, Japanese), and database compatibility with the original One API schema. Deployment is Docker-centric: a docker-compose file is provided, and single-container runs are documented for SQLite (default, requires mounting /data) or MySQL. PostgreSQL ≥ 9.6 and MySQL ≥ 5.7.8 are supported as remote databases; only 64-bit amd64/arm64 is supported. A BaoTa panel one-click install is also documented. Multi-node setups require a shared primary database and identical SESSION_SECRET, and nodes sharing Redis must also share CRYPTO_SECRET. The README details session handling across shared Redis, per-node Redis and no-Redis topologies, including staleness windows and how rate limits behave in each case. Numerous environment variables are documented for timeouts, request body limits, stream buffering, trusted proxies, session limits and Pyroscope profiling. The project is licensed under AGPLv3 with additional Section 7 terms requiring preservation of an attribution notice and a visible link to the original repository in modified versions. It is derived from One API (MIT). The README emphasizes that use is intended for lawful, authorized gateway, multi-model management, analytics and private-deployment scenarios, and that operators offering public generative AI services must satisfy applicable filing, licensing, content-safety and related obligations.