Back home Visit source
Merge Gateway
Intro
Merge Gateway is Merge’s LLM control plane / routing product—positioned as “the control plane for production AI.” Product page: https://www.merge.dev/gateway ; docs: https://docs.merge.dev/merge-gateway/get-started . It sits alongside Merge Unified (data integrations) and Merge Agent Handler (agent tools) in Merge’s stack.
Purpose: access major LLMs through one API, with routing, cost controls, failover, and security features, instead of juggling separate provider accounts and invoices.
Highlights (from Merge’s product/docs pages):
- One endpoint / key for models across vendors; new models Merge adds become available without new integrations;
- Route by cost, latency, or quality; automatic failover when a provider is down;
- Budgets and spend attribution by project/team/customer; optional context compression;
- Policies, DLP / prompt-injection controls, and logging of routing decisions;
- Integrate by pointing SDKs at Gateway base URLs (e.g. OpenAI-compatible
https://api-gateway.merge.dev/v1) or using the Merge Gateway SDK.
Explain
Problem
Production AI products often hard-code one vendor, then face outages, price swings, and multi-invoice ops. Teams also need per-customer budgets and compliance filters without building a custom gateway.
Design
- Model aliases & routing policies: send
@alias/...instead of a hard-coded model ID; edit the policy to change failover/cost/quality targets without redeploying; - Projects: separate spend, budgets, and policies by team or environment;
- Customer controls: embed per-tenant routing, BYOK, and usage limits in your product;
- Wire formats for OpenAI, Anthropic, Vercel AI SDK, and LangChain via documented base URLs.
Limits & notes
- Pricing/plans (Free vs Pro catalog access) are defined by Merge—check current Plans and pricing on docs;
- Exact model catalog and supported vendors change over time; use Merge’s model catalog rather than inventing lists;
- Distinct from Merge Agent Handler (tools) and Merge Unified (SaaS data sync).
Usage
Who it's for
- Product teams shipping multi-model AI features who need one integration surface;
- Platforms that must offer customers routing policies, budgets, or BYOK;
- Engineering orgs consolidating LLM spend and failover across vendors.
Getting started
- Read https://www.merge.dev/gateway and https://docs.merge.dev/merge-gateway/get-started ;
- Sign up, create a Gateway API key (
mg_...), optionallypip install merge-gateway-pythonor use cURL againsthttps://api-gateway.merge.dev/v1/responses; - For existing OpenAI/Anthropic/LangChain clients, change the base URL to the matching Gateway endpoint from the docs table;
- Create a routing policy / model alias for production traffic instead of pinning a single vendor model ID.
Advertisement