Skip to content

new-api

Self-hosted AI gateway that routes many model providers through one API and web console

Copyleft (OSI) · AGPL-3.0 AI-native

Listed by , founder & editor

87

Health

Thriving

Overview

Stars

52,463

Last commit

today

Nov 2026

Repository age

3 years

since Nov 2023

Latest version

v1.0.0-rc.51

Nov 2026

Contributors

–

23 active in 90 days

Releases

25

last 12 months

Language

Go

New API is a self-hosted gateway that sits between your applications and upstream model services. You connect providers such as OpenAI, Anthropic, Google Gemini, Azure OpenAI, AWS Bedrock, Vertex AI, DeepSeek and Qwen, then give clients one consistent API. It accepts OpenAI Chat Completions and Responses, Anthropic Messages and Gemini request formats.

Routing is configurable. You can set model mappings, channel priorities and weights, retries, channel affinity and multiple upstream keys. A web console handles channels, models, users, groups, quotas, subscriptions, usage logs and audit logs, and includes a playground. Sign-in supports OAuth/OIDC, passkeys and two-factor authentication. The console is available in seven languages.

The project is written in Go, ships with Docker support and uses the AGPL-3.0 license. It is a self-hosted equivalent for teams who would otherwise use OpenRouter, but it does not give you hosted pay-as-you-go access to providers. You bring your own upstream keys and accounts.

Who it's for

Platform teams sharing model access across an organization

Per-user quotas, groups, permissions and API key restrictions let you hand out access without sharing upstream keys.

Skip if: You only need one provider for one app, where a direct API key is simpler.

Developers running a private multi-model service

One endpoint speaks OpenAI, Anthropic and Gemini formats, so clients do not need reconfiguring when you switch providers.

Skip if: You want a hosted service with no infrastructure to run.

Teams tracking AI spend per user or group

Usage logs, quotas and expression-based pricing give you cost accounting in one console.

Skip if: You need built-in content guardrails as a core feature.

The problem it solves

Using several model providers means juggling separate keys, API formats and bills across every client. New API puts one gateway in front of them. You control routing, access and spend from one place on your own infrastructure.

Strengths

  • Accepts OpenAI Chat/Responses, Anthropic Messages and Gemini request formats
  • Channel priorities, weights, retries and multiple upstream keys for routing
  • Quotas, subscriptions, usage logs and audit logs in a web console
  • OAuth/OIDC, passkeys and two-factor authentication supported
  • Docker deployment; 25 releases in the past year

Trade-offs

  • No hosted pay-as-you-go access to providers; you supply upstream keys
  • Fewer built-in guardrail features than some gateways
  • AGPL-3.0 license carries obligations if you offer it as a network service
  • Latest version is a release candidate (v1.0.0-rc.51)

Self-host new-api

Self-hostable
Yes
Docker Compose
The repository ships a Compose file

Frequently asked questions

Is New API free?

Yes. It is open source under AGPL-3.0. You still pay your upstream providers for model usage.

Can I self-host it?

Yes. It is built for self-hosting and has Docker support.

Which providers can it connect to?

Upstreams include OpenAI, Anthropic, Google Gemini, Azure OpenAI, AWS Bedrock, Vertex AI, DeepSeek, Qwen and other compatible services.

Does it replace OpenRouter?

As a self-hosted gateway with a console, key management and usage billing, yes. It has no public model marketplace or hosted access to many providers.

Similar tools in LLM gateways and routers

GoModel

LLM gateways and routers

Go-based AI gateway giving one OpenAI and Anthropic compatible endpoint for many LLM

1.3k 136 today Thriving MIT

Portkey AI Gateway

LLM gateways and routers

Self-hostable MIT-licensed gateway for routing requests across LLM providers

13k 1.4k 6 months ago Dormant MIT

Bifrost

LLM gateways and routers

Self-hosted AI gateway that routes one OpenAI-style API to 23+ LLM providers

10k 1.6k today Thriving Apache-2.0

Manifest

LLM gateways and routers

Self-hosted OpenAI-compatible gateway that routes agent requests across models and keys

7.7k 534 today Thriving MIT

Replaces OpenRouter

ClawRouter

LLM gateways and routers

Local LLM router that sends each request to the cheapest capable model for AI agents

6.7k 656 today Thriving MIT

oh-my-cpa

LLM gateways and routers

Self-hosted web console for monitoring and routing traffic through CLIProxyAPI

487 55 today Thriving MIT