最近推送 2026-10-28 17:50(0 天前),属于活跃维护
QuantumNous/new-api
GITHUB项目档案主语言 Go · 50,880 星 · AGPL-3.0 · 创建于 2023-11-11
Open-source AI gateway. Self-hosted LLM gateway with OpenAI-, Claude- and Gemini-compatible APIs, model routing, access control, usage tracking and cost…
仓库健康度
5 个维度开放 Issue 1,401 个 · Fork 12,327 个
24 小时 +7 · 7 日 积累中 · 30 日 积累中
许可证 AGPL-3.0 · 8 个 topics
这一项暂无数据,不代表项目没有发布
「证据不足」表示这项数据暂时没有取到,不能读成「项目有问题」;「部分数据」表示只拿到一部分信号。版本发布要额外调 Releases 接口,下一版补。
Star 趋势
2 天记录横轴 2026-10-28 → 2026-10-29,纵轴按这段时间的最小/最大值拉伸。趋势来自站内每天记录一次的星数,页面打开时不会实时请求 GitHub。
README 原文细节
3 个板块核心功能README 里列出来的能力清单
Capabilities
- Model access — Use OpenAI Chat Completions, Responses, Anthropic Messages, and Gemini APIs; stream responses and use tools, reasoning, and multimodal inputs where supported
- Routing — Configure model mappings, channel priorities and weights, retries, channel affinity, and multiple upstream keys
- Usage and costs — Manage quotas, subscriptions, usage logs, cache accounting, and expression-based pricing for different usage tiers
- Access control — Manage users, groups, fine-grained permissions, and API key restrictions; use OAuth/OIDC, passkeys, two-factor authentication, and login session management
- Asynchronous tasks — Extend image, video, and other task APIs with JavaScript plugins, including task status and output retrieval
- Web console — Configure channels and models, inspect usage and audit logs, and try models in the playground; available in English, Simplified Chinese, Traditional Chinese, French, Japanese, Russian, a
配置项能调整哪些参数
Storage and configuration
See the environment example, environment reference, and authentication and session guide for full configuration. Configure container variables in Compose's environment or envfile; copying .env.example alone does not inject variables into the container.
For production, put the console behind HTTPS and configure your reverse proxy for streaming and WebSocket upgrades. Persist and back up the database and mounted data. Multi-node deployments must share the main database and authentication secrets; separate Redis instances or in-memory rate limiters count limits independently per node. The session guide describes propagation behavior for each topology.
Pin an image version from Releases, review its upgrade notes, and back up before upgrading. The latest tag follows published builds and can change; migrations and compatibility must be assessed for your existing installation.
- Main database — SQLite, MySQL ≥ 5.7.8, or PostgreSQL ≥ 9.6
- Separate log database — Configure with LOGSQLDSN; also supports ClickHouse
- Cache — Optional Redis plus in-memory caching; use shared Redis when application nodes need shared rate limits
- Container platforms — Linux amd64 / arm64
- SQLDSN — Main database connection; unset uses SQLite
- LOGSQLDSN — Optional separate log database connection
- REDISCONNSTRING — Redis connection string
- SESSIONSECRET — Persistent authentication secret; all nodes must use the same value
- CRYPTOSECRET — Defaults to SESSIONSECRET; nodes sharing Redis must use the same effective value
- SESSIONCOOKIESECURE — Set to true for an HTTPS console; enables Secure refresh cookies and strict refresh/logout origin checks
- SESSIONCOOKIETRUSTEDURL — Required in Secure mode: comma-separated exact HTTPS origins, without paths or wildcards; leave unset for local HTTP
- TRUSTEDPROXIES — Trusted reverse-proxy IPs/CIDRs, or none; explicitly configure for your network
其它说明README 里剩下的内容
Screenshots
Accounts, channels, plugin installation states, usage, prices, and costs shown below are simulated data. The marketplace displays the official plugin catalog. Click an image to view it at full size.
- Model square — Usage logs
Protocols and endpoints
RelayKit provides request, response, and streaming conversion between the four text protocols. Available features depend on the channel, upstream model, and conversion path; protocol-specific tools and fields may not map exactly. WebSocket support also requires a compatible upstream and channel configuration.
This README describes the current source tree. Check the release notes for the version you deploy.
- OpenAI Chat / Responses — POST /v1/chat/completions, POST /v1/responses
- Anthropic Messages — POST /v1/messages
- Gemini — POST /v1beta/models/{model}:generateContent, POST /v1beta/models/{model}:streamGenerateContent
- Realtime / Responses WebSocket — GET /v1/realtime, GET /v1/responses (WebSocket upgrade)
- Images / audio — /v1/images/generations, /v1/images/edits, /v1/audio/speech, /v1/audio/transcriptions, /v1/audio/translations
- Embeddings / rerank — POST /v1/embeddings, POST /v1/rerank
- Task plugins — POST /v1/tasks/{pluginKey}, GET /v1/tasks/{taskId}, plus routes declared by each plugin
Make your first request
Set NEWAPIKEY in your shell to that key. List the models accessible to it:
Then call Responses, replacing your-enabled-model with an enabled model that supports this interface:
- Add a channel with your upstream API key, available models, and group assignment; run a channel test.
- Configure model pricing and ensure the user has quota or a valid subscription.
- Create an API key in the console with access to the same group and models.
- Set your client's base URL to http://localhost:3000/v1 for OpenAI-compatible clients and use the New API-issued key.
关于 new-api 的常见问题
3 个问题new-api 是做什么的?
QuantumNous/new-api 是 GitHub 上的开源项目:Open-source AI gateway. Self-hosted LLM gateway with OpenAI-, Claude- and Gemini-compatible APIs, model routing, access control, usage tracking and cost accounting。README 里的说明是:Screenshots • Capabilities • Quick start • Deployment • Development • Documentation
new-api 有哪些功能?
项目 README 列出的能力包括:Model access — Use OpenAI Chat Completions, Responses, Anthropic Messages, and Gemini APIs; stream responses and use tools, reasoning, and multimodal inputs where supported;Routing — Configure model mappings, channel priorities and weights, retries, channel affinity, and multiple upstream keys;Usage and costs — Manage quotas, subscriptions, usage logs, cache accounting, and expression-based pricing for different usage tiers;Access control — Manage users, groups, fine-grained permissions, and API key restrictions; use OAuth/OIDC, passkeys, two-factor authentication, and login session management;Asynchronous tasks — Extend image, video, and other task APIs with JavaScript plugins, including task status and output retrieval;Web console — Configure channels and models, inspect usage and audit logs, and try models in the playground; available in English, Simplified Chinese, Traditional Chinese, French, Japanese, Russian, a。
new-api 现在还在维护吗?数据怎么样?
目前 50,880 星,12,327 个 Fork,主语言 Go,创建于 2023-11-11,最近一次推送 2026-10-28 17:50,许可证 AGPL-3.0。星数、Fork、推送时间都是 GitHub 返回的实时数据,「最近推送」离现在越近说明越活跃;长期不动要留意是否已停止维护。
这些内容来自哪
读法说明项目数据取自 GitHub 官方接口与项目 README;星数、Fork、语言与时间以 GitHub 页面为准,档案更新于 2026-10-28 23:55。