Every AI provider has its own API shape, its own rate limits, and its own bad days. Plexus fixes that by sitting in front of your providers and giving your code one consistent API to call. It is an open source gateway for OpenAI, Anthropic, Gemini, and OpenAI-compatible providers, so you can switch models and providers without changing client code (GitHub). When one provider fails, traffic moves on automatically instead of taking your app down with it.
Key Takeaways
Plexus normalizes OpenAI, Anthropic, and Gemini requests into one API surface, including streaming, tool use, embeddings, audio, and images.
You route traffic by cost, latency, usage, quota, or performance, and failed providers trigger automatic failover with exponential cooldowns.
It ships as a single self-contained binary or a Docker image, with a dashboard for request logs, tokens, cost, latency, and provider health.
Secrets are encrypted at rest with AES-256-GCM, and per-key quotas keep one client from eating the whole budget.
What Is Plexus?
Plexus describes itself as a unified API gateway for multiple AI providers. The README summary reads: "Unified API gateway for multiple AI providers (OpenAI, Anthropic, Gemini, etc.). Switch models and providers without changing client code. Features OAuth authentication, quota tracking, embeddings, transcriptions, and OpenAI-compatible endpoints." (GitHub). The project is public under the MIT licence, and at the time of writing it had 238 stars and 57 forks on GitHub.
The idea is simple, and it matters most in production. Your app talks to Plexus, and Plexus talks to the providers. A model alias such as "fast" can point at one provider today and another tomorrow, with no code change and no redeploy. That alias layer is what turns vendor lock-in from an architectural fact into a configuration choice.
Watch the 30-second repo signal that first surfaced this project: Watch the 30-second repo signal.
How Plexus Routes a Request
Plexus accepts OpenAI Chat Completions and Responses, Anthropic Messages, and Gemini native requests, then translates them in both directions (GitHub). Streaming and tool use work through the same normalized surface, so an agent that calls tools does not need a separate code path per provider.
Routing is where Plexus earns its keep. You map an alias to one or more targets and pick a selection strategy: random, in_order, cost, performance, latency, usage, quota, or e2e_performance. A cost routed alias sends traffic to the cheapest healthy target. A latency routed alias sends it to the fastest. A quota routed alias respects the limits you set, which is exactly what you want when a team shares one provider account.
Resilience is built into the same layer. Plexus applies exponential cooldowns to failing providers, fails over when a provider errors, detects stalled streams, and uses vision fallthrough for targets that cannot handle images. In plain terms: a provider outage becomes a brief detour, not an incident.
One Dashboard for Cost, Tokens, and Provider Health
The dashboard is the operating view. From it you configure providers and aliases, inspect every request, and watch usage and quota health. Request logs show the model, provider, tokens, cost, latency, and live throughput, while the providers view shows status and quota indicators (GitHub).
That visibility changes how you run AI features. Instead of guessing which model is eating your budget, you can see tokens and cost per request. Instead of discovering a quota problem from a user complaint, you see the quota indicator turn. For a small team, that is the difference between running AI in production and merely hoping it works.
Running Plexus in Five Minutes
Plexus is easy to try because the binary is self-contained, with database migrations and the web dashboard embedded. The quickest route is Docker:
docker run -p 4000:4000 \ -v plexus-data:/app/data \ -e ADMIN_KEY="your-admin-password" \ -e ENCRYPTION_KEY="your-generated-hex-key" \ ghcr.io/mcowger/plexus:latest
Open the dashboard at http://localhost:4000, create an API key and a model alias, then send a request to the gateway as if it were OpenAI:
curl -X POST http://localhost:4000/v1/chat/completions \ -H "Authorization: Bearer YOUR_PLEXUS_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "fast", "messages": [{"role": "user", "content": "Hello!"}]}'
Two environment variables matter. ADMIN_KEY is required for the dashboard and management API. DATABASE_URL is optional and defaults to SQLite at ./data/plexus.db; use a PostgreSQL connection string for production. With ENCRYPTION_KEY set, API keys, OAuth tokens, provider secrets, and MCP headers are encrypted at rest with AES-256-GCM (GitHub).
Plexus vs Calling Providers Directly
Aspect | Plexus | Calling providers directly |
|---|---|---|
API surface | One normalized API for all providers | One integration per provider |
Switching models | Change an alias, no code change | Edit code, redeploy |
Provider outage | Automatic failover with cooldowns | Your app errors until the provider recovers |
Cost and quota control | Per-key quotas, cost routing, live cost logs | Manual tracking across dashboards |
Extra moving part | Yes, you run and update the gateway | No, but every provider change touches your code |
That table also shows who should skip it. If you call one model from one provider in a side project, direct calls are simpler. Plexus pays off when you run AI in production, use more than one provider, or need cost control and failover that no single provider gives you.
Limits Worth Knowing Before You Start
Plexus is a gateway, which means it is one more service to run, monitor, and update. Self-hosting also means you own uptime for the gateway itself, so run it somewhere reliable and keep its database backed up. The project also supports OAuth-backed subscriptions and streamable HTTP MCP servers, which adds power but also configuration surface; start with API keys and one alias before wiring up the advanced pieces.
It is also worth noting the project's pace: the repository already carries 2,423 commits, and the docs cover installation, configuration, custom quota checkers, and testing in detail. Read the configuration docs before putting real traffic through it, especially the quota and encryption settings.
For a related explainer on the API style Plexus normalizes around, read REST API Explained: How the Web's Most Common API Style Actually Works. And if you prefer the Docker route, the container setup is covered in Docker Explained: What Containers Are and Why Developers Love Them.
Frequently Asked Questions
Do I need to rewrite my app to use Plexus?
No. Plexus exposes OpenAI-compatible endpoints, so an existing OpenAI client can point at the gateway, with the model name replaced by a Plexus alias.
Which providers does Plexus support?
OpenAI, Anthropic, Gemini, and OpenAI-compatible providers, plus OAuth-backed subscriptions. It also proxies streamable HTTP MCP servers.
Is Plexus free?
Yes. It is open source under the MIT licence. You only pay for the infrastructure you run it on and the provider usage behind it.
What happens when my main provider goes down?
Plexus fails over to another target for the same alias, applying exponential cooldowns to the failed provider so it is not hammered while it recovers.
Read this article in Indonesian: Plexus: Satu Gateway API untuk Semua Provider AI, Dengan Failover Otomatis
