An AI gateway for models, applications, and agents
open sourceAGPL-3.0-onlyself-hostablefree
Forked from One API in 2023.
New API is a self-hosted AI gateway with a web console, built on One API: you add upstream 'channels' with your own keys or accounts for OpenAI, Anthropic, Gemini, Azure OpenAI, AWS Bedrock, Vertex AI, DeepSeek, Qwen and other compatible services, then issue your own API keys to users who call OpenAI Chat Completions and Responses, Anthropic Messages, Gemini, Realtime, image, audio, embedding and rerank endpoints. It handles model mappings, channel priorities, weights and retries, and meters every call against user quotas, subscriptions and expression-based prices, with top-ups through Stripe, Creem or Epay, redemption codes, groups, OAuth/OIDC sign-in and usage logs. Its README says it is intended solely for lawful and authorized use, that users must obtain upstream keys and accounts lawfully and comply with upstream terms, and that anyone running it as a public AI service or API resale service must first meet their jurisdiction's filing, licensing, content safety, real-name, log retention, tax and upstream authorization obligations. It is AGPLv3 with attribution terms, written in Go and React by QuantumNous, and runs from a Docker image or binaries with SQLite, MySQL or PostgreSQL and optional Redis.
Ways to install
On your own server
Hosted for you
Problems it solves
- share our company's OpenAI and Claude API keys with the team without handing out the real keys
- give each developer their own API key with a spending quota across many model providers
- self-host a private multi-model API service with usage logs and cost accounting
- switch AI providers without reconfiguring every client app
- expose Claude models through an OpenAI-compatible endpoint, or GPT models through the Anthropic Messages API
- route requests across several upstream keys with priorities, weights and automatic retries
- charge internal teams for AI usage with per-model prices and quotas
- let users top up AI credits with Stripe and track their balance
- a self-hosted alternative to One API with a newer console and more protocols
- put Azure OpenAI, AWS Bedrock and Vertex AI behind one gateway for our apps
- sign in to our AI gateway's console with our company's OIDC provider
- see token usage, cost and response time per user, key and model
- issue redemption codes that add AI usage credit to accounts
- add image and video generation task APIs to our gateway with plugins
- point Open WebUI, Dify or n8n at one internal endpoint for all our models
Features
- OpenAI Chat Completions and Responses, Anthropic Messages and Gemini endpoints, with conversion between them (RelayKit)
- Realtime and Responses WebSocket, images, audio, embeddings and rerank endpoints
- channels with model mappings, priorities, weights, retries, channel affinity and multiple upstream keys
- users, groups, fine-grained permissions and API key restrictions
- quotas, subscriptions, cache accounting and expression-based pricing
- top-ups through Stripe, Creem and Epay, and redemption codes
- sign-in with OAuth/OIDC, GitHub, Discord, Telegram, WeChat and LinuxDO, plus passkeys and two-factor authentication
- usage logs, audit logs and a playground in the web console
- JavaScript task plugins for image, video and other async APIs, with an official plugin marketplace
- SQLite, MySQL or PostgreSQL, a separate log database (including ClickHouse) and optional Redis
View 2 more
- console in English, Chinese, French, Japanese, Russian and Vietnamese
- Docker images for Linux amd64 and arm64; binaries for Linux, macOS and Windows; Electron desktop wrapper
Capabilities
| Has an API | plan not known |
|---|---|
| Takes plugins | plan not known |
| Has single sign-on | plan not known |
Alternatives
The same job
These do what New API does.
- LiteLLM The AI Gateway for platform teams.
- OmniRoute The free AI gateway: one endpoint for hundreds of providers, with quota-aware fallback
- Portkey AI Gateway A blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
- One API Access all LLM through the standard OpenAI API format, easy to deploy & use
- CLIProxyAPI Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code and Devin as an OpenAI/Gemini/Claude/Codex compatible API service
- 9Router FREE AI Router & Token Saver
