Apply your own routing policies, reduce token costs automatically, and see every routing decision in real time with Merge Gateway.

| Vendor | Input / 1M tokens | Output / 1M tokens | Zero data retention |
| --- | ---: | ---: | --- |
| Amazon Bedrock | $3.00 | $15.00 | Yes |
| Anthropic | $3.00 | $15.00 | No |
1$ pip install merge-gateway-sdk1from 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": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
9 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
10 ],
11)
12
13print(response.output[0].content[0].text)1response = client.responses.create(
2 model="anthropic/claude-sonnet-4-20250514",
3 input=[
4 {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)1from openai import OpenAI
2
3client = OpenAI(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/openai",
6)1response = client.chat.completions.create(
2 model="gpt-5.2",
3 messages=[
4 {"role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)
8
9print(response.choices[0].message.content)1npm install merge-gateway-ai-sdk-provider ai1import { createMergeGateway } from "merge-gateway-ai-sdk-provider";
2
3const gateway = createMergeGateway({
4 apiKey: "YOUR_API_KEY",
5});1import { generateText } from "ai";
2
3const { text } = await generateText({
4 model: gateway("openai/gpt-4o"),
5 prompt: "Explain the concept of recursion in programming with a simple set of examples.",
6});
7
8console.log(text);1import { createOpenAI } from "@ai-sdk/openai";
2
3const gateway = createOpenAI({
4 apiKey: "YOUR_API_KEY",
5 baseURL: "https://api-gateway.merge.dev/v1/ai-sdk",
6});
7
8// All generateText/streamText calls work unchanged1from anthropic import Anthropic
2
3client = Anthropic(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/anthropic",
6)
7
8message = client.messages.create(
9 model="claude-sonnet-4-20250514",
10 max_tokens=1024,
11 messages=[
12 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
13 ],
14)
15
16print(message.content[0].text)Anthropic structures its lineup across three tiers: a fast cost-efficient model, a general-purpose mid-tier, and a flagship reasoning model. Here are some other models Anthropic supports:
Claude Sonnet 4.6 occupies the mid-tier of Anthropic's lineup, sitting above Haiku on capability and below Opus on cost and raw intelligence score.
Claude Sonnet 4.6 is the right choice when you need near-Opus intelligence at a lower price point and your use cases involve multimodal input or long context without requiring extended reasoning traces.
No single model is optimal for every task. Here are models worth pairing with Claude Sonnet 4.6 depending on what your product needs:
Like any production LLM, Claude Sonnet 4.6 comes with tradeoffs worth planning for:
Using Claude Sonnet 4.6 through Merge Gateway gives you access to the model itself and the infrastructure layer around it:
Getting Claude Sonnet 4.6 running through Merge Gateway takes a few minutes:
1. Create an account and get your API key from the dashboard.
2. Install the Merge Gateway SDK: run pip install merge-gateway-sdk (Python) or npm install merge-gateway-sdk (Node). Alternatively, if you're already using the OpenAI SDK, set base_url = "https://api-gateway.merge.dev/v1/openai" and your existing code works as-is.
3. Make your first request using the provider/model format. For Claude Sonnet 4.6, the model string is anthropic/claude-sonnet-4-6 (confirm the exact dated slug with Anthropic's API docs). Swap the model string to route to any other provider without changing anything else.
4. Configure a routing policy in the dashboard to set failover behavior, cost limits, and optimization strategy. A practical starting point: name Claude Sonnet 4.6 as primary, with Claude Haiku 4.5 as a fallback for simpler tasks and Claude Opus 4.8 for ceiling-level requests.
Full setup instructions and SDK references are in the Merge Gateway docs.
Route, observe, and control AI requests across providers from one API.
