Stop Juggling a Dozen AI APIs: One Endpoint to Rule Them All
You know the pain: you're building an app that uses ChatGPT, but then you want to add Claude for certain tasks, maybe a bit of Gemini for vision, and suddenly you're maintaining three different SDKs, three different auth schemes, and three different response formats. It's a mess. That's exactly the problem One API sets out to solve—it gives you a single, OpenAI-compatible endpoint that sits in front of virtually every major LLM provider out there.
One API is an open-source gateway that normalizes access to dozens of AI models through the standard OpenAI API format. Instead of learning each provider's quirks, you talk to One API the same way you'd talk to OpenAI, and it handles the translation, routing, and key management behind the scenes.
What It Does
At its core, One API is a proxy server. It accepts requests formatted like OpenAI's chat completions API and forwards them to whatever upstream provider you've configured. The project is written in Go, which makes it lightweight and easy to deploy as a single binary or a Docker container.
The README lists an impressive roster of supported providers: OpenAI (including Azure OpenAI), Anthropic Claude (with AWS support), Google's PaLM2 and Gemini, Mistral, ByteDance's Doubao, Baidu's Ernie, Alibaba's Qwen, iFlytek's Spark, Zhipu's ChatGLM, 360 Brain, Tencent's Hunyuan, Moonshot AI, Baichuan, MiniMax, Groq, Ollama, and several others. That's not just a handful of Western models—it's a genuinely global coverage, which is rare.
The architecture is straightforward: you configure your upstream API keys in One API's dashboard, then point your application at One API's endpoint. Your app only ever needs to know one API format, one base URL, and one set of credentials (the ones you generate in One API). The gateway takes care of the rest, including tracking usage and managing multiple keys for the same provider.
Why It's Cool
The obvious selling point is the unified API format, but there's more to like here.
-
Multi-provider, single point of control. You can have fifteen different model providers configured, but your application only knows about One API. Want to switch a model from GPT-4 to Claude 3? That's a config change in the dashboard, not a code rewrite. This is huge for teams that want to experiment with different models without rearchitecting their integration layer.
-
Built for real-world deployment. The project ships as a Docker image (
justsong/one-apion Docker Hub, plus a GHCR mirror), which means deployment is as simple as pulling a container and setting a few environment variables. There's also a live demo linked in the README if you want to poke around before committing. -
Usage tracking and key management built in. Because all requests flow through One API, you get a natural choke point for monitoring. You can issue separate API keys to different users or services, track their consumption, and manage quotas—without adding any code to your application.
-
It's genuinely open. The project is MIT-licensed, has a GoReportCard badge, and maintains multiple language versions of the README (Chinese, English, and Japanese). The active community and regular releases (with stable, preview, and alpha channels) suggest a project that's being maintained seriously.
-
The "just works" factor. The README's tagline is "开箱即用" which translates to "works out of the box." For a tool that bridges so many different providers with their wildly different auth schemes and request formats, that's an ambitious promise—and the fact that it supports AWS Claude and Azure OpenAI, which have their own signing mechanisms, suggests the authors have put serious work into the hard edges.
How to Try It
Getting started is straightforward. The project has a deployment guide in the README (it's in Chinese, but the English version is linked at the top of the page), and the Docker route is the fastest way to get up and running.
docker run --name one-api -d --restart always -p 3000:3000 -e TZ=Asia/Shanghai justsong/one-api
After that, open http://localhost:3000 in your browser. The default login is root with password 123456—and the README has a prominent warning to change that immediately.
Once you're in the dashboard, you'll add your upstream provider API keys, then generate a new key for your application. Point your OpenAI SDK at http://localhost:3000/v1 with your new key, and you're done. Your existing OpenAI-compatible code will work against any of the supported providers.
The repo is at github.com/songquanpeng/one-api, where you'll find the full README, the deployment guide, and links to the online demo.
Final Thoughts
One API is a practical tool for anyone who's tired of vendor lock-in or who needs to offer multiple model choices to their users. It's not trying to be a fancy orchestration framework—it's a solid, well-tested bridge that does one thing and does it thoroughly. If you're building a product that uses LLMs and you want the flexibility to swap providers without touching your codebase, this is worth a serious look. The multi-provider coverage alone is hard to beat, and the fact that it's a single Go binary makes it about as low-friction as infrastructure gets.
Follow @githubprojects for more developer tools and open source projects.