new-api: An AI gateway for models, applications, and agents.
What problem it solves
Teams using multiple upstream model services need a consistent client-facing API without reconfiguring every application whenever providers change. They also need centralized control over model routing, authorized access, usage, quotas, and costs.
Key features
Compatible model APIs — Expose OpenAI Chat Completions and Responses, Anthropic Messages, and Gemini APIs to clients, including streaming, tools, reasoning, and multimodal inputs where supported.
Source: README
Configurable routing — Route requests across upstream services with model mappings, channel priorities and weights, retries, affinity, and multiple upstream keys.
Source: README
Usage and cost management — Administer quotas, subscriptions, usage logs, cache accounting, and expression-based pricing for different usage tiers.
Source: README
Access control and authentication — Manage users, groups, permissions, and API key restrictions, with OAuth/OIDC, passkeys, two-factor authentication, and login session management.
Source: README
Task plugins and web console — Extend task APIs with JavaScript plugins and manage channels, models, usage, audit logs, and model tests through a multilingual web console.
Source: README
Quick start
Copied verbatim from the project's README.
mkdir -p data
docker run --name new-api -d --restart unless-stopped \
-p 127.0.0.1:3000:3000 \
-e TZ=Asia/Shanghai \
-v "$(pwd)/data:/data" \
calciumion/new-api:latestcurl --fail-with-body http://localhost:3000/v1/responses \
-H "Authorization: Bearer ${NEW_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"model":"your-enabled-model","input":"Hello!"}'Who it may suit
Inference: this may suit teams operating private multi-model services, developers building model-powered applications and agents, and organizations that need centralized access and cost management.
Topics to discuss
Which upstream providers and protocol combinations should receive priority in future compatibility work?
How can routing policies better balance availability, cost, and channel affinity across multiple upstream keys?
What plugin workflows would be most valuable for image, video, and other asynchronous task APIs?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/QuantumNous/new-api#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…