Favicon of New API

New API

Self-hosted AI gateway connects apps to OpenAI, Anthropic and Gemini APIs, with provider routing, access controls and usage tracking. Open source under AGPL-3.0

New API is a self-hosted AI gateway for developers and teams that want several model providers behind one service. It builds on One API and converts between OpenAI Chat Completions, Responses, Anthropic Messages and Gemini formats, so apps and agents can switch providers without changing each client's connection settings.

The gateway runs on your own machine or server through Docker, with Linux containers for AMD64 and ARM64. Model requests go to the connected upstream services. Cloud providers require internet access and authorized API keys or accounts; hosting the gateway yourself doesn't keep those requests on your hardware. Supported providers include OpenAI, Anthropic, Google Gemini, DeepSeek and Qwen, alongside Azure OpenAI, AWS Bedrock and Vertex AI.

Routing includes provider priorities, weighted distribution and retries. Teams can control access through user groups, permissions and API key restrictions, with OAuth/OIDC, passkeys and two-factor authentication for sign-in. The web console brings model management, usage and audit logs, cost accounting and a model playground into one interface.

Beyond text chat, it handles image and audio APIs, embeddings and reranking. JavaScript plugins extend image, video and other asynchronous tasks. Streaming, tool use, reasoning, multimodal inputs and WebSocket connections depend on the upstream model and conversion path; some protocol-specific fields don't map exactly. New API is open source under AGPL-3.0, with additional attribution terms for modified versions.

Similar to New API