Merge Gateway

The control plane for production AI

Access all LLMs through a single API, with intelligent routing, cost management, and security built-in.

Copy
Copy
Copy
Copy
Copy
Copy
1from merge_gateway import MergeGateway
2 
3client = MergeGateway(api_key="YOUR_API_KEY")
4 
5response = client.responses.create(
6    model="openai/gpt-5.2",
7    input=[
8        {"type": "message", "role": "user", "content": "Which LLM is actually the best? No bias allowed."},
9    ],
10)
1from merge_gateway import MergeGateway
2 
3client = MergeGateway(api_key="YOUR_API_KEY")
4 
5response = client.responses.create(
6    model="anthropic/claude-sonnet-4-20250514",
7    input=[
8        {"type": "message", "role": "user", "content": "Which LLM is actually the best? No bias allowed."},
9    ],
10)
1from merge_gateway import MergeGateway
2 
3client = MergeGateway(api_key="YOUR_API_KEY")
4 
5response = client.responses.create(
6    model="google/gemini-2.0-flash",
7    input=[
8        {"type": "message", "role": "user", "content": "Which LLM is actually the best? No bias allowed."},
9    ],
10)
1import { MergeGateway } from "merge-gateway-sdk";
2 
3const client = new MergeGateway({ apiKey: "YOUR_API_KEY" });
4 
5const response = await client.responses.create({
6  model: "openai/gpt-5.2",
7  input: [
8    { type: "message", role: "user", content: "Which LLM is actually the best? No bias allowed." },
9  ],
10});
1import { MergeGateway } from "merge-gateway-sdk";
2 
3const client = new MergeGateway({ apiKey: "YOUR_API_KEY" });
4 
5const response = await client.responses.create({
6  model: "anthropic/claude-sonnet-4-20250514",
7  input: [
8    { type: "message", role: "user", content: "Which LLM is actually the best? No bias allowed." },
9  ],
10});
1import { MergeGateway } from "merge-gateway-sdk";
2 
3const client = new MergeGateway({ apiKey: "YOUR_API_KEY" });
4 
5const response = await client.responses.create({
6  model: "google/gemini-2.0-flash",
7  input: [
8    { type: "message", role: "user", content: "Which LLM is actually the best? No bias allowed." },
9  ],
10});
Trusted by teams building the next generation of AI products
logo Open AIlogo Mistral AIlogo Dropboxlogo Ramplogo Perplexitylogo factory.ailogo Workday

One API. Every model. Total control.

Stop managing separate provider accounts. One endpoint gives you access to every major LLM with routing, cost controls, and observability included by default.

Your models stay up, even when providers don't

Connect to every major LLM through one endpoint. Merge routes each request automatically by cost, latency, or quality.

Every new model Merge supports is available to you automatically. When a provider goes down, failover is instant. No code changes required.

 Set a budget, we'll enforce it

Cap spend by project, team, or customer tier in real time. Cut token costs automatically with context compression.

Attribute every dollar to a model, provider, and team. Consolidate all provider invoices into one.

Route on your own terms, not ours

Define what the best model means for your product. Merge scores every model against benchmarks you weight and picks the winner on each request.

Start with presets or build your own. See which models were chosen and why to fine-tune your routing logic.

Control what reaches your models, and what doesn't

Stay in compliance with data loss prevention (DLP), prompt injection protection, and more. Filter sensitive data before it reaches any provider.

Enforce per-customer model and region policies. Log every routing decision, cost, and outcome in one place.

Embedded Routing Stack

Give every customer their own model controls

Embed routing controls in your product, without building custom infrastructure. 
Allow customer to own routing policies, credentials, budgets, and usage controls.

Programmatic management

Provision, configure, and manage every customer through APIs. No manual setup or dashboard required.

Per-customer routing

Give each customer their own routing policies while automatically falling back to your organization defaults.

Customer-managed API keys

Support BYOK with built-in fallback or strict mode for compliance and data residency.

Budgets and usage

Set spend limits, track usage by customer, and support pass-through billing with per-tenant reporting.

One line of code.
Deploy once.
No excuses.

Change the base URL to gateway.merge.dev/v1.
Every model, routing rule, and cost control is live from the first request.

Before
base_url = "https://api.openai.com/v1"
After
base_url = "https://gateway.merge.dev/v1"

One API key replaces every provider signup

Access all major LLMs with one API key. 
No separate accounts, no scattered credentials, no multiple invoices to manage.

Switch providers with a config change, not a refactor

Test any model head-to-head. 
Migrate away from a vendor without touching your application code.

Access every new model the day it ships

New providers and versions available automatically. No integration updates, no release delays.

See Gateway in action

“Thanks to Merge Gateway’s LLM routing functionality and spend cap rules, we’re able to save more than $10,000 per month on LLM spend without sacrificing performance.”

Ben Danzig
Software Engineer, Windmill

FAQ

How does Gateway pricing work?
Which LLM providers are supported?
How does routing and fallback work?
What is Build Your Own Router?
How long does it take to integrate?
Can I use Gateway with my existing AI SDK?
Can I bring my own API keys?

Your AI roadmap is ambitious.
Your infrastructure should match.

Start for free. Zero fees for 12 months when you sign up by June 30.