# GPT-5.6

Move an app from GPT-5.5 or GPT-5.4 to GPT-5.6: pick one of three tiers, and the request keeps working as it is.

1. [Change the model ID](#1-change-the-model-id).
2. [Update the request](#2-update-the-request).
3. [Read the answer](#3-read-the-answer).
4. [Set the effort](#4-set-the-effort).
5. [Compare before you switch](#5-compare-before-you-switch).

## 1. Change the model ID

GPT-5.6 comes as three tiers, each with a `-pro` ID: the same model, served with pro reasoning, which works longer before one final answer.

| Model ID | For |
|---|---|
| `openai/gpt-5.6-sol` | the most capable: complex reasoning, coding, agents |
| `openai/gpt-5.6-sol-pro` | Sol, with pro reasoning |
| `openai/gpt-5.6-terra` | a balance: everyday coding, reasoning and agents |
| `openai/gpt-5.6-terra-pro` | Terra, with pro reasoning |
| `openai/gpt-5.6-luna` | fast, high-volume work: chat, classification |
| `openai/gpt-5.6-luna-pro` | Luna, with pro reasoning |

| | From | To |
|---|---|---|
| Model ID | `openai/gpt-5.5` or `openai/gpt-5.4` | one of the six above |
| Context | 1 050 000 tokens | 1 050 000 tokens |
| Longest answer | 128 000 tokens | 128 000 tokens |
| Effort levels | `none` · `low` · `medium` · `high` · `xhigh` | the same, and `max` |

Each ID also exists with `:batch` at its end, for batch work. [`GET /v1/model/{lab}/{model}`](/docs/reference/model) answers each model's entry. The request keeps its shape; `model` changes.

```json
{
  "model": "openai/gpt-5.6-terra",
  "reasoning": {
    "effort": "medium"
  },
  "messages": [
    {
      "role": "user",
      "content": "Find the slow query in this log and explain it."
    }
  ]
}
```

## 2. Update the request

Nothing you send today is refused. Two additions are worth taking.

| Addition | What it does |
|---|---|
| a `-pro` ID | pro reasoning: for hard work where quality matters more than time and tokens |
| `prompt_cache_options` | `{"mode": "explicit", "ttl": "30m"}` caches only the parts you mark with `cache_control`; it replaces `prompt_cache_retention` |

```json
{
  "model": "openai/gpt-5.6-sol",
  "prompt_cache_key": "souk-bot-faq",
  "prompt_cache_options": {
    "mode": "explicit",
    "ttl": "30m"
  },
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "The shop's full FAQ: …",
          "cache_control": {
            "type": "ephemeral"
          }
        },
        {
          "type": "text",
          "text": "Do you deliver to Constantine?"
        }
      ]
    }
  ]
}
```

How the prompt cache works, and what it saves: [Caching](/docs/caching).

## 3. Read the answer

| Change | Where |
|---|---|
| writing to the cache is now charged, at the model's cache-write rate | `usage.prompt_tokens_details.cache_write_tokens`, beside `cached_tokens` |
| answers run shorter by default than on GPT-5.5 | check whether a "keep it short" line in your prompt still helps |
| a pro answer counts all the reasoning behind it | `usage.completion_tokens_details.reasoning_tokens` |

Where cache writes cost more than the reads save, cache fewer parts: mark only the start that repeats. See [Chat](/docs/reference/chat-completions).

## 4. Set the effort

| Route | Field |
|---|---|
| `/v1/chat/completions` | `reasoning.effort`, or `reasoning_effort` |

OpenAI gives `medium` as the default. From GPT-5.5 or GPT-5.4, keep the level you ran, then try one level lower: OpenAI reports GPT-5.6 reaching the same results with fewer tokens. `max` is new, above `xhigh`: compare the two before you pay for it.

## 5. Compare before you switch

Send the same set of real prompts to both IDs, and compare three things.

| Compare | Where |
|---|---|
| the answers | your own check: a test suite, a reviewer, the task's pass rate |
| what each cost | `usage.cost`, in DA, on every answer |
| how much each reasoned | `usage.completion_tokens_details.reasoning_tokens` |

GPT-5.6 comes as tiers, so the comparison is a sweep: one task to the old ID and to each tier, with two more runs for the two things this move adds, one effort level lower and a `-pro` ID. The script prints one line per run: how the answer ended, what the model reasoned, and the charge in DA, then the first words of the answer.

| Run | Model | Effort |
|---|---|---|
| `from` | `MODEL` | `EFFORT` |
| `sol` | `SOL` | `EFFORT` |
| `sol, lower` | `SOL` | `LOWER` |
| `sol-pro` | `SOL_PRO` | `EFFORT` |
| `terra` | `TERRA` | `EFFORT` |
| `luna` | `LUNA` | `EFFORT` |

```python
import os
from openai import OpenAI

API_KEY = os.environ["OPENDUNES_API_KEY"]
BASE_URL = "https://opendunes.com/v1"
MODEL = "anthropic/claude-sonnet-4.5"
SOL = "anthropic/claude-sonnet-4.5"
SOL_PRO = "anthropic/claude-sonnet-4.5"
TERRA = "anthropic/claude-sonnet-4.5"
LUNA = "anthropic/claude-sonnet-4.5"
EFFORT = "medium"
LOWER = "low"
MAX_TOKENS = 8000
TASK = (
    "Find the slow query in this log and explain it.\n\n"
    "12:01 SELECT * FROM orders WHERE status = 'late' took 4210 ms\n"
    "12:01 SELECT id FROM users WHERE id = 7 took 3 ms\n"
    "12:02 UPDATE stock SET count = count - 1 WHERE sku = 'B-112' took 12 ms"
)
RUNS = [
    ("from", MODEL, EFFORT),
    ("sol", SOL, EFFORT),
    ("sol, lower", SOL, LOWER),
    ("sol-pro", SOL_PRO, EFFORT),
    ("terra", TERRA, EFFORT),
    ("luna", LUNA, EFFORT),
]

client = OpenAI(base_url=BASE_URL, api_key=API_KEY)

for label, model, effort in RUNS:
    reply = client.chat.completions.create(
        model=model,
        max_tokens=MAX_TOKENS,
        messages=[{"role": "user", "content": TASK}],
        extra_body={"reasoning": {"effort": effort}},
    )
    usage = reply.usage
    details = usage.completion_tokens_details
    thought = details.reasoning_tokens if details else 0
    print(
        f"{label:11} {reply.choices[0].finish_reason:7}",
        f"thought {thought}",
        f"cost {usage.cost}",
    )
    print("   ", (reply.choices[0].message.content or "")[:60])
```

```javascript
import OpenAI from "openai";

const API_KEY = process.env.OPENDUNES_API_KEY;
const BASE_URL = "https://opendunes.com/v1";
const MODEL = "anthropic/claude-sonnet-4.5";
const SOL = "anthropic/claude-sonnet-4.5";
const SOL_PRO = "anthropic/claude-sonnet-4.5";
const TERRA = "anthropic/claude-sonnet-4.5";
const LUNA = "anthropic/claude-sonnet-4.5";
const EFFORT = "medium";
const LOWER = "low";
const MAX_TOKENS = 8000;
const TASK =
  "Find the slow query in this log and explain it.\n\n" +
  "12:01 SELECT * FROM orders WHERE status = 'late' took 4210 ms\n" +
  "12:01 SELECT id FROM users WHERE id = 7 took 3 ms\n" +
  "12:02 UPDATE stock SET count = count - 1 WHERE sku = 'B-112' took 12 ms";
const RUNS = [
  ["from", MODEL, EFFORT],
  ["sol", SOL, EFFORT],
  ["sol, lower", SOL, LOWER],
  ["sol-pro", SOL_PRO, EFFORT],
  ["terra", TERRA, EFFORT],
  ["luna", LUNA, EFFORT],
];

const client = new OpenAI({ baseURL: BASE_URL, apiKey: API_KEY });

for (const [label, model, effort] of RUNS) {
  const reply = await client.chat.completions.create({
    model,
    max_tokens: MAX_TOKENS,
    messages: [{ role: "user", content: TASK }],
    reasoning: { effort },
  });
  const { usage, choices } = reply;
  const thought = usage.completion_tokens_details?.reasoning_tokens ?? 0;
  console.log(
    label.padEnd(11),
    choices[0].finish_reason.padEnd(7),
    `thought ${thought}`,
    `cost ${usage.cost}`,
  );
  console.log("   ", (choices[0].message.content ?? "").slice(0, 60));
}
```

```go
package main

import (
	"context"
	"fmt"
	"os"
	"strconv"

	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
)

const (
	baseURL   = "https://opendunes.com/v1"
	model     = "anthropic/claude-sonnet-4.5"
	sol       = "anthropic/claude-sonnet-4.5"
	solPro    = "anthropic/claude-sonnet-4.5"
	terra     = "anthropic/claude-sonnet-4.5"
	luna      = "anthropic/claude-sonnet-4.5"
	effort    = "medium"
	lower     = "low"
	maxTokens = 8000
	task      = "Find the slow query in this log and explain it.\n\n" +
		"12:01 SELECT * FROM orders WHERE status = 'late' took 4210 ms\n" +
		"12:01 SELECT id FROM users WHERE id = 7 took 3 ms\n" +
		"12:02 UPDATE stock SET count = count - 1 WHERE sku = 'B-112' " +
		"took 12 ms"
)

type run struct {
	label  string
	model  string
	effort string
}

func main() {
	apiKey := os.Getenv("OPENDUNES_API_KEY")

	runs := []run{
		{"from", model, effort},
		{"sol", sol, effort},
		{"sol, lower", sol, lower},
		{"sol-pro", solPro, effort},
		{"terra", terra, effort},
		{"luna", luna, effort},
	}

	client := openai.NewClient(
		option.WithBaseURL(baseURL),
		option.WithAPIKey(apiKey),
	)
	for _, r := range runs {
		params := openai.ChatCompletionNewParams{
			Model:     openai.ChatModel(r.model),
			MaxTokens: openai.Int(maxTokens),
			Messages: []openai.ChatCompletionMessageParamUnion{
				openai.UserMessage(task),
			},
		}
		params.SetExtraFields(map[string]any{
			"reasoning": map[string]any{"effort": r.effort},
		})
		reply, err := client.Chat.Completions.New(context.TODO(), params)
		if err != nil {
			panic(err)
		}
		choice := reply.Choices[0]
		fmt.Printf("%-11s %-7s thought %d cost %v\n",
			r.label, choice.FinishReason,
			reply.Usage.CompletionTokensDetails.ReasoningTokens,
			charge(reply))
		fmt.Printf("    %.60s\n", choice.Message.Content)
	}
}

func charge(reply *openai.ChatCompletion) float64 {
	cost := reply.Usage.JSON.ExtraFields["cost"].Raw()
	value, _ := strconv.ParseFloat(cost, 64)
	return value
}
```

```bash cURL
ADDRESS="https://opendunes.com/v1/chat/completions"
MODEL="anthropic/claude-sonnet-4.5"
SOL="anthropic/claude-sonnet-4.5"
SOL_PRO="anthropic/claude-sonnet-4.5"
TERRA="anthropic/claude-sonnet-4.5"
LUNA="anthropic/claude-sonnet-4.5"
EFFORT="medium"
LOWER="low"
TASK="Find the slow query in this log and explain it. \
12:01 SELECT * FROM orders WHERE status = 'late' took 4210 ms. \
12:01 SELECT id FROM users WHERE id = 7 took 3 ms. \
12:02 UPDATE stock SET count = count - 1 WHERE sku = 'B-112' took 12 ms."

run() {
  jq -n --arg model "$2" --arg task "$TASK" --arg effort "$3" \
    '{model: $model, max_tokens: 8000,
      reasoning: {effort: $effort},
      messages: [{role: "user", content: $task}]}' |
    curl -s "$ADDRESS" \
      -H "Authorization: Bearer $OPENDUNES_API_KEY" \
      -H "Content-Type: application/json" \
      -d @- |
    jq -c --arg label "$1" '{label: $label,
      finish: .choices[0].finish_reason,
      thought: .usage.completion_tokens_details.reasoning_tokens,
      cost: .usage.cost,
      answer: ((.choices[0].message.content // "") | .[:60])}'
}

run "from" "$MODEL" "$EFFORT"
run "sol" "$SOL" "$EFFORT"
run "sol, lower" "$SOL" "$LOWER"
run "sol-pro" "$SOL_PRO" "$EFFORT"
run "terra" "$TERRA" "$EFFORT"
run "luna" "$LUNA" "$EFFORT"
```

The samples put `anthropic/claude-sonnet-4.5` in every seat, so they run as they stand. Set `MODEL` to `openai/gpt-5.5` or `openai/gpt-5.4`, and the others to the IDs below.

| Seat | Model ID |
|---|---|
| `SOL` | `openai/gpt-5.6-sol` |
| `SOL_PRO` | `openai/gpt-5.6-sol-pro` |
| `TERRA` | `openai/gpt-5.6-terra` |
| `LUNA` | `openai/gpt-5.6-luna` |

Read `sol` against `sol, lower` first: OpenAI reports GPT-5.6 reaching the same results with fewer tokens, so the lower level is the cheaper one if your check agrees. Then read `sol-pro` against `sol`, in `thought` and in the charge: pro reasoning is worth its cost only where the answer is better.

Switch once the new ID holds; going back is the same one-line change. Run your red-team suite on the new ID too: [Red teaming](/docs/cookbook/red-teaming).
