Route requests to
GPT-5.6 Luna
with Merge Gateway

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

What GPT-5.6 Luna costs to run

| Vendor | Input / 1M tokens | Output / 1M tokens | Zero data retention | | --- | ---: | ---: | --- | | OpenAI | $0.7500 | $4.50 | Yes |

Test GPT-5.6 Luna
with Gateway’s Simulator

See a prompt's output, token spend, latency, and more with GPT-5.6 Luna.

Route requests to GPT-5.6 Luna in minutes

To get started in seconds, add our Gateway Implementation skill to your project, or pick your preferred SDK below. Check out our other quick start skills here.
Install the Merge Gateway SDK
Python
Copied!
1$ pip install merge-gateway-sdk
Send a request
Python
Copied!
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": "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)
Try a diffrent model
Swap the model string to route to a different provider. No other code changes needed.
Anthropic
Copied!
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)
Point to Gateway
Python
Copied!
1from openai import OpenAI
2
3client = OpenAI(
4    api_key="YOUR_API_KEY",
5    base_url="https://api-gateway.merge.dev/v1/openai",
6)
Send a request
Use the standard chat.completions.create method. No provider prefix needed on the model name.
Python
Copied!
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)
Install packages
Copied!
1npm install merge-gateway-ai-sdk-provider ai
Create the provider
TypeScript
Copied!
1import { createMergeGateway } from "merge-gateway-ai-sdk-provider";
2
3const gateway = createMergeGateway({
4  apiKey: "YOUR_API_KEY",
5});
Send a request
Use generateText to send a request. Model names use the provider/model format.
TypeScript
Copied!
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);
If you already have @ai-sdk/openai installed, point it at Gateway with a base URL change:
TypeScript
Copied!
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 unchanged
Install the Merge Gateway SDK
Anthropic SDK
Copied!
1from 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)

Explore other models available in Merge Gateway

model logo
Amazon Nova 2 Lite
model logo
Amazon Nova 2 Lite
model logo
Amazon Nova 2 Sonic
model logo
Amazon Nova Lite
model logo
Amazon Nova Micro
model logo
Amazon Nova Premier
model logo
Amazon Nova Pro
model logo
Amazon Nova Pro
model logo
Claude 3.7 Sonnet
model logo
Claude 3.7 Sonnet
model logo
Claude 4 Opus 20250514
model logo
Claude Fable 5
model logo
Claude Fable 5
model logo
Claude Haiku 4.5 (20251001)
model logo
Claude Opus 4.1 (20250805)
model logo
Claude Opus 4 (20250514)
model logo
Claude Opus 4.5 (20251101)
model logo
Claude Opus 4.6
model logo
Claude Opus 4.6
model logo
Claude Opus 4.7
model logo
Claude Opus 4.7
model logo
Claude Opus 4.8
model logo
Claude Opus 4.8
model logo
Claude Opus 5

GPT-5.6 Luna FAQ

Have more questions about GPT-5.6 Luna? We've covered a handful below. Note that this reflects what was known in July, 2026, and details are subject to change as OpenAI iterates on the model.

Heading

What other models does OpenAI offer?

OpenAI's current lineup runs from a flagship reasoning tier down to lightweight, high-volume models built for cost-sensitive traffic. Here are some other models OpenAI supports:

  • GPT-5.6 Sol: the flagship of the GPT-5.6 family, built for complex reasoning, coding, and long-horizon agentic work, with a 1.05 million token context window and pricing of $5 input and $30 output per million tokens
  • GPT-5.6 Terra: the balanced, default tier in the same family, priced at $2.50 input and $15 output per million tokens, aimed at everyday production traffic that doesn't need Sol's peak reasoning depth
  • GPT-5.5: OpenAI's prior-generation flagship, released in April 2026 and now positioned below the GPT-5.6 family, still available for teams running workloads validated against it
  • GPT-5.4 mini: a lower-cost general-purpose model from the GPT-5.4 generation, available on OpenAI's free tier and suited to everyday tasks that don't require frontier-level reasoning
  • GPT-5.4 nano: the smallest and cheapest model in the GPT-5.4 line, priced at $0.20 input and $1.25 output per million tokens, built for extremely high-volume, low-complexity work like classification and short-form extraction

How does GPT-5.6 Luna differ from OpenAI's other models?

Luna sits at the bottom of the GPT-5.6 family's cost and latency curve, trading peak reasoning depth for speed and price.

  • Benchmark scores: On the Artificial Analysis Intelligence Index, Sol scores 59 (rank #4 of 189 tracked models), Terra scores 55 (#11), and Luna scores 51 (#20). Luna trails its siblings on raw intelligence but still lands well above the field median
  • Pricing: Luna costs $1 input and $6 output per million tokens, with cached input at $0.10, versus $2.50/$15 for Terra and $5/$30 for Sol, roughly a fifth of Sol's rate
  • Speed: Luna is the fastest of the three in Artificial Analysis testing, generating output at roughly 197 tokens per second versus 144 for Terra and 69 for Sol. The tradeoff runs opposite to price: Luna is both the cheapest and the fastest
  • Context window and capabilities: All three models share the same 1.05 million token context window, 128,000 token max output, image input support, and function-calling and reasoning-token support. The tiers differ in reasoning depth applied per request, not in raw capability surface

Luna is the right pick when a product needs to process a high volume of requests at low latency and low per-token cost, and where Sol's or Terra's extra reasoning depth wouldn't change the outcome of most individual requests.

What models should I consider using alongside GPT-5.6 Luna?

No single model is optimal for every task. Here are models worth pairing with GPT-5.6 Luna depending on what your product needs:

  • Gemini 3.5 Flash (Google): for workloads that lean on retrieval across very large documents or long multi-turn context, Gemini 3.5 Flash's long-context handling and Google-ecosystem integration cover ground Luna alone can't
  • Grok 4.1 Fast (xAI): for latency-critical agentic workflows with heavy tool-calling, Grok 4.1 Fast's non-reasoning speed profile complements Luna for requests where even a lightweight reasoning pass adds too much delay
  • DeepSeek V4 Flash (DeepSeek): for high-volume code generation where cost per request matters more than peak coding benchmark scores, DeepSeek V4 Flash gives you a cheaper option to route routine code tasks to
  • Mistral Small (Mistral): for use cases that need an open-weight or self-hostable option, such as strict data residency requirements, Mistral Small covers simple classification and generation tasks without routing traffic through OpenAI at all

What are the challenges of using GPT-5.6 Luna in my product?

Like any production LLM, GPT-5.6 Luna comes with tradeoffs worth planning for:

  • Provider dependency: Luna runs exclusively on OpenAI's infrastructure. An OpenAI outage, rate-limit change, or deprecation of the Luna checkpoint directly disrupts any product that hasn't built in a fallback
  • Cost at scale: Even at $1/$6 per million tokens, Luna is a reasoning model that generates chain-of-thought tokens before its final answer. Those reasoning tokens bill as output, so verbose responses compound cost faster than the sticker price suggests without active monitoring
  • Long-context price cliff: Pricing roughly doubles once a request crosses OpenAI's long-context threshold, moving Luna from $1/$6 to $2/$9 per million tokens. Workloads with unpredictable document lengths need to account for that jump, not just the standard rate
  • Rapid version churn: OpenAI shipped GPT-5.4, GPT-5.5, and GPT-5.6 within roughly a year. Pinning to a specific model string carries real deprecation risk, and teams need a plan for migrating to newer tiers as older ones sunset
  • Text-only output: Luna accepts image input but only returns text. Products that need generated images, audio, or video have to route those request types to a different model entirely, adding a second integration to maintain

Why should I use Merge Gateway to route LLM requests with GPT-5.6 Luna and every other model?

Using GPT-5.6 Luna through Merge Gateway gives you access to the model itself and the infrastructure layer around it:

  • One API, every provider: Call GPT-5.6 Luna and every other major LLM through the same endpoint and API key. Switching providers means swapping a model string, not rewriting application code
  • Intelligent routing and automatic failover: Merge automatically routes around OpenAI outages. Routing policies built on cost, latency, or quality signals can cut spend 40-60% without any changes to your application
  • Cost governance: Set hard or soft budgets per project so Luna spend stays predictable. Every request rolls up to a model, project, and tag in one billing dashboard spanning every provider
  • Build Your Own Router: Decide what "best" means for your traffic using curated ML benchmarks or your own eval scores. The router weighs each candidate model against those criteria and picks a winner per request, with a plain-language explanation attached
  • Security and compliance controls: DLP rules and prompt injection protection run before any request reaches OpenAI. Per-project model and region policies get enforced centrally, without adding that logic into your product

How can I start routing requests to GPT-5.6 Luna via Merge Gateway?

Getting GPT-5.6 Luna 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 GPT-5.6 Luna, the model string is openai/gpt-5.6-luna. 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. Your first policy can be as simple as naming GPT-5.6 Luna as primary with one fallback.

Full setup instructions and SDK references are in the Merge Gateway docs.

Try GPT-5.6 Luna through Merge Gateway

Route, observe, and control AI requests across providers from one API.