GPT-5.6 Luna API Guide (2026): Pricing, Context, and the 272K Fix

On July 18, 2026, OpenAI pushed a small but important Codex CLI update: version 0.144.6 refreshed the bundled instructions for GPT-5.6 Sol, Terra, and Luna and corrected their context windows to 272,000 tokens in the CLI metadata. That sounds cosmetic until you run agents at scale. Bad context metadata makes routers, truncation logic, and budget guards lie to you.

At the same time, the API docs still show GPT-5.6 Luna as a cheap, high-volume model with a much larger model context window. That mismatch is exactly why this matters. If your tooling reads the wrong number, you may over-truncate, under-budget, or send prompts that look safe in staging and explode in production.

TL;DR / Key Takeaways

  • OpenAI's Codex CLI 0.144.6 on July 18, 2026 corrected GPT-5.6 Sol, Terra, and Luna context windows to 272,000 tokens in the CLI metadata.
  • GPT-5.6 Luna costs $1.00 per 1 million input tokens and $6.00 per 1 million output tokens on OpenAI's API pricing page.
  • GPT-5.6 Luna is the cheapest GPT-5.6 tier and is aimed at cost-sensitive, high-volume workloads.
  • GPT-5.6 Terra costs $2.50 per 1 million input tokens and $15.00 per 1 million output tokens.
  • GPT-5.6 Sol costs $5.00 per 1 million input tokens and $30.00 per 1 million output tokens.

If you build coding agents, support bots, or routing layers, the real lesson is simple: stop treating model names as static labels. Treat them as moving parts with pricing, context, and tool behavior that can change underneath you. A gateway like KissAPI helps here because you can swap tiers without rewriting every client.

What the July 18 Fix Actually Changes

The obvious reading is that OpenAI fixed a docs bug. The practical reading is better: your automation should not trust old cached metadata. If your router believed Luna had more or less context than it really does, it may have been making the wrong decision about chunking, summarization, or fallback selection.

That matters most in three places:

Pricing Table

Model Input price Output price Context window
GPT-5.6 Luna $1.00 / 1M tokens $6.00 / 1M tokens 1,050,000 tokens
GPT-5.6 Terra $2.50 / 1M tokens $15.00 / 1M tokens 1,050,000 tokens
GPT-5.6 Sol $5.00 / 1M tokens $30.00 / 1M tokens 1,050,000 tokens

Those numbers make the playbook pretty clear. Start with Luna for the noisy, high-volume stuff. Use Terra when the task needs more headroom. Keep Sol for the jobs where quality matters more than cost. That is the cleanest way to avoid paying flagship prices for grunt work.

Model Comparison

Model Best for Strength Key limitation
GPT-5.6 Luna High-volume chat, classification, extraction, cheap subagents Lowest price in the family Least headroom for tasks that need deeper reasoning quality
GPT-5.6 Terra General-purpose production workloads Better balance of capability and cost Costs 2.5x Luna on input and 2.5x Luna on output
GPT-5.6 Sol Harder reasoning, premium assistant flows, final-pass agent work Strongest GPT-5.6 tier 5x Luna input cost and 5x Luna output cost

How I Would Route This in Production

My default rule is boring, and that is why it works:

  1. Send short, repetitive, or easy-to-check tasks to Luna.
  2. Escalate to Terra if the task spans more context or the first pass looks shaky.
  3. Escalate to Sol only when quality matters more than the extra cost.

This is where many teams overthink it. They spend two weeks benchmarking the best model and then wire every task to that model. That is a nice way to burn budget. Route by job shape, not by ego.

curl Example

curl https://api.openai.com/v1/responses \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-luna",
    "input": [
      {
        "role": "system",
        "content": "You are a concise support triage assistant. Classify the request, extract the issue, and return JSON."
      },
      {
        "role": "user",
        "content": "Classify this ticket: The webhook retries every 30 seconds after a 429."
      }
    ]
  }'

Python Example

from openai import OpenAI

client = OpenAI()

resp = client.responses.create(
    model="gpt-5.6-luna",
    input=[
        {"role": "system", "content": "You are a concise support triage assistant. Return JSON only."},
        {"role": "user", "content": "Summarize this incident in one paragraph and list next steps."}
    ]
)

print(resp.output_text)

Node.js Example

import OpenAI from "openai";

const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

const response = await client.responses.create({
  model: "gpt-5.6-luna",
  input: [
    { role: "system", content: "Return valid JSON with fields: summary, severity, action." },
    { role: "user", content: "A batch job failed because the token budget was exceeded." }
  ]
});

console.log(response.output_text);

What Developers Should Check Before Shipping

If you are already using GPT-5.6 Luna, do three things today:

The best teams also keep a fallback path. I like a unified gateway for that because it lets you switch vendors or tiers without touching every integration. If you already use KissAPI, this is exactly the kind of swap it makes painless.

Rule of thumb: if a task is repeatable, measurable, and not obviously high-stakes, try GPT-5.6 Luna first. If the result is good enough, keep the cheap path. If not, climb one tier instead of jumping straight to Sol.

FAQ

Is GPT-5.6 Luna the cheapest GPT-5.6 model?

Yes. OpenAI's pricing page lists Luna at $1.00 per 1 million input tokens and $6.00 per 1 million output tokens.

Why does Codex CLI show a 272,000-token context window?

OpenAI's Codex CLI 0.144.6 refresh on July 18, 2026 corrected the bundled metadata for GPT-5.6 Sol, Terra, and Luna to 272,000 tokens inside the CLI. That is separate from the live API model docs.

When should I use Terra or Sol instead?

Use Terra when Luna is too weak for a task but you still care about cost. Use Sol when the task is expensive to get wrong and needs the strongest tier in the family.

Need a cheaper fallback before the next traffic spike?

Create a free account at kissapi.ai/register and keep an OpenAI-compatible backup route ready while you tune model routing.

Start Free