What is an LLM gateway?
An LLM gateway is one endpoint and key that routes requests to many model providers. Here is what it does, why it helps, and who actually needs one.
An LLM gateway is one API in front of many model providers: one key, one bill, one endpoint, with routing and failover handled for you. UnoRouter is an open source gateway serving 200+ models through an OpenAI compatible API, plus Anthropic and Gemini native endpoints, with a free tier on most models and pay as you go pricing on the rest.
An LLM gateway is a single API endpoint that sits in front of many model providers and routes your request to whichever model you ask for. Instead of holding a separate key, base URL, and SDK quirk for each lab, you hold one key and one OpenAI-compatible endpoint, and the gateway handles the rest. It is the same idea as an API gateway in classic backend work, applied to language models. Here is what that buys you.
The plain definition
A gateway exposes one OpenAI-compatible interface, usually /v1/chat/completions, and maps the model field in your request to a real provider behind the scenes. You send the same request shape every time; the gateway picks the upstream, attaches the right provider credentials, translates any quirks, and streams the response back. Your code does not change when you switch models, because the contract you code against stays constant.
Why it helps
Three wins. One integration: write against one endpoint and you can use every model the gateway carries, with no per-provider client. One bill: usage across all providers lands on a single balance instead of a dozen separate invoices. And easy switching: changing a model is a one-line edit, so you can chase the best price or quality per task without re-plumbing your app. For most builders the time saved on integration alone is the whole reason.
How it works under the hood
When a request arrives, the gateway reads the model name, looks up the matching upstream provider, swaps in that provider's credentials, rewrites any provider-specific body fields, and forwards the call. The streamed tokens come back through the same connection, so from your side it looks like one normal OpenAI call. Good gateways add retries on transient errors, usage and cost accounting, and a current model catalog so new releases appear without you touching anything.
Who actually needs one
You want a gateway if you use more than one model, plan to switch models as prices and quality move, or build anything that should not be hard-wired to a single lab. Coding agents, chat apps, character chat front ends, and internal tools all benefit. If you genuinely only ever call one model from one provider and never expect to change, a direct provider key is simpler. Everyone else saves real effort with a gateway.
In short
An LLM gateway turns many providers into one endpoint, one key, and one bill, so you integrate once and switch models freely. UnoRouter is an OpenAI-compatible gateway in exactly this mold: one key reaches 200+ models for code and chat alike, with pay-as-you-go credits that do not expire. If you touch more than one model, a gateway is the cleaner foundation.
Try a gateway yourself: create a free account or browse the models.
Frequently asked questions
When do I need an LLM gateway instead of a direct provider key?
When you use more than one model family, want failover when a provider is down, or want one bill. A gateway removes per vendor accounts and lets you switch models by changing one string.
Does an LLM gateway add latency?
One extra hop, typically tens of milliseconds, which streaming hides in practice. Slow responses come from the model itself far more often than from the gateway.
Which endpoints does UnoRouter serve?
OpenAI compatible /v1/chat/completions, /v1/responses and /v1/embeddings, Anthropic native /v1/messages, and Gemini native /v1beta, all behind one key.
Nevika takes any OpenAI-compatible endpoint as a custom proxy. Here is the one minute setup, which model to pick, and the two errors people hit.
A roleplayer ranks three Claude Opus versions on UnoRouter: memory, emotional depth, drive, and creative writing. 4.8 wins, 4.6 beats 4.7, and each one wins or slips in a clear place.
SpicyChat is a zero-setup RP site whose memory and context are gated behind paid tiers. UnoRouter keeps the easy start but adds 200+ models you choose, deep lorebooks, and a key that also runs coding agents.