Claude Sonnet 5 vs GPT-5.6
Qual usar e quando
Esses dois são próximos em formato - ambos aceitam texto e imagem na entrada, devolvem texto, limitam a saída a 128000 tokens e oferecem aproximadamente o mesmo contexto (1000000 para o claude-sonnet-5, 1050000 para o gpt-5.6) com pensamento desligável - então a diferença real é a tabela de preços. O claude-sonnet-5 fica em $2 de entrada e $10 de saída contra $5 e $30 do gpt-5.6, o que deixa o modelo da OpenAI em 2.5x o custo de entrada e 3x o de saída, com leituras de cache a $0.5 contra $0.2. Escolha o claude-sonnet-5 para chat, código e ferramentas em grande volume; vá de gpt-5.6 quando quiser especificamente a pilha da OpenAI ou seu corte um pouco mais recente de fevereiro de 2026.
Benchmarks
18 medidos em ambos.
Publicado pelos provedores: Alibaba (Qwen) Anthropic ByteDance DeepSeek Google MiniMax Moonshot OpenAI Tencent Z.ai
Preços
| Claude Sonnet 5 | GPT-5.6 | Δ | |
|---|---|---|---|
| Entrada / 1M tokens | $2 | $5 | 0.4× |
| Saída / 1M tokens | $10 | $30 | 0.33× |
| Leitura de cache / 1M tokens | $0.2 | $0.5 | 0.4× |
| Escrita de cache | 1.25x (5m) / 2x (1h) | sem cobrança separada | - |
Tarifas do catálogo em tempo real, lidas no momento do build; a página de cada modelo traz a tabela de preços atual.
Onde cada um fica: preço de entrada por 1M tokens entre os 76 modelos de chat com esta unidade de cobrança (escala logarítmica)
Capacidades
| Claude Sonnet 5 | GPT-5.6 | |
|---|---|---|
| Uso de ferramentas | sim | sim |
| Controle de raciocínio | configurável | configurável |
| Saída estruturada | sim | sim |
| Cache de prompts | explícito (você marca o prefixo) | implícito (automático) |
| Tempo de vida do cache | 5m default, 1h option | 5-10m, up to 1h |
| Prefixo mínimo em cache | 1024 tokens | 1024 tokens |
Especificações
| Claude Sonnet 5 | GPT-5.6 | |
|---|---|---|
| Modalidades de entrada | texto imagem | texto imagem |
| Modalidades de saída | texto | texto |
| Lançamento | 2026-06-30 | 2026-07-09 |
| Corte de conhecimento | 2026-01 | 2026-02 |
| Janela de contexto | 1M | 1.1M |
| Saída máxima | 128K | 128K |
| Parâmetro de raciocínio |
| reasoning.effort |
| Valores aceitos | thinking.type
effort
"enabled" returns 400 | reasoning.effort
|
| Padrão | thinking on (adaptive) effort
| medium |
As especificações são transcritas da documentação de cada provedor; quando um provedor não publica um dado, a linha é omitida, e não inferida. Fontes completas: Claude Sonnet 5 · GPT-5.6
Um prompt, os dois modelos, medidos pelo gateway
Claude Sonnet 5 passou · 3 sentences
Reasoning mode works by having the model generate extended internal "thinking" steps before producing its final answer, and since we're billed on total tokens, that hidden reasoning text adds significantly to what we pay for—even though you never see it in the output. This is different from simply getting longer visible responses; the model is essentially "showing its work" behind the scenes, and complex prompts can trigger thousands of extra reasoning tokens per request. The upside is improved accuracy on complex tasks, but if we want to control costs, we should selectively enable reasoning only for queries that truly need it, rather than applying it universally.
saída 194 tok latência 4.3 s
GPT-5.6 passou · 3 sentences
Enabling reasoning makes the model generate many additional internal tokens before producing an answer, so each request consumes substantially more compute. Those reasoning tokens are billed even though they are not visible to users, and longer processing can also increase tool calls, retries, and output length. The bill doubled because our cost per request rose, not necessarily because usage volume increased; we can control it by limiting reasoning effort and routing simpler tasks to cheaper models.
saída 126 tok (+30 raciocínio) latência 3.0 s
Se a instrução é seguida (exatamente três frases, dá para contar), a adequação ao público (tom para um CFO) e a diferença de cobrança causada pelo raciocínio oculto, que os medidores de tokens abaixo deixam à mostra.
Claude Sonnet 5 passou · 8/8 cases
## The Bug The function has two related off-by-one issues rooted in the same cause: `cur` and `best` are initialized to `0` instead of `1`, treating run lengths as the number of *matches* between adjacent elements rather than the number of *elements* in the run. This means a single-element input never enters the loop (since `range(1, 1)` is empty) and returns `0` instead of the correct answer of `1`. It also means that for any input, the run length is undercounted by exactly one — a run of 3 equal elements only produces 2 "match" increments, so `best` ends up as 2 instead of 3. The claim that it "misses runs that end at the last index" is actually a symptom of this same undercount: the logic does update `best` correctly on every iteration (including the last), but because it's counting matches instead of elements, the final reported value is always one less than the true longest run. […]
saída 536 tok latência 7.1 s
GPT-5.6 passou · 8/8 cases
```python def longest_run(xs): if not xs: return 0 best = cur = 1 for i in range(1, len(xs)): if xs[i] == xs[i - 1]: cur += 1 else: best = max(best, cur) cur = 1 return max(best, cur) ``` The original code counted equal *transitions* rather than items, so a run of one had length `0`, a run of three had length `2`, and tracking from zero caused the off-by-one error. The corrected version starts each run at length `1`, resets to `1` when the value changes, and performs a final `max` after the loop so a run ending at the last element is included; an empty input still returns `0`.
saída 277 tok (+93 raciocínio) latência 4.2 s
Se a correção está mesmo certa (dá para executar), a densidade da explicação e a eficiência em tokens em uma tarefa bem delimitada.
Claude Sonnet 5 passou · 5/5 fields, guidance null
```json { "company": "Meridian Robotics", "quarter": "Q3", "revenue_usd_m": 412, "growth_pct": 11.5, "guidance": null } ```
saída 348 tok latência 5.3 s
GPT-5.6 passou · 5/5 fields, guidance "withheld pending the Q4 close"
{ "company": "Meridian Robotics", "quarter": "September quarter", "revenue_usd_m": 412, "growth_pct": null, "guidance": "withheld pending the Q4 close" }
saída 179 tok (+118 raciocínio) latência 3.7 s
Aderência ao schema (sem campos inventados), pressão para alucinar (o texto diz explicitamente que o guidance não foi divulgado) e diferenças no caminho de saída estruturada.
Claude Sonnet 5 passou · 123 words, 0 banned, 1 question
## Introducing Cross-Provider Prompt Caching We're rolling out a new caching layer for our API gateway that works across every major LLM provider you connect through it. Instead of resending identical prompts and paying full price each time, the gateway recognizes repeated requests and serves cached responses in milliseconds—regardless of whether you're routing to OpenAI, Anthropic, or Google. What does this mean for your bill and your latency? Both drop, often significantly, especially for teams running high-volume, repetitive workloads like customer support bots or batch content generation. The cache is configurable per route, with adjustable TTLs and invalidation rules, so you stay in control of freshness versus cost. Available now for all Pro and Enterprise plans. Check your dashboard to enable it today.
saída 259 tok latência 4.8 s
GPT-5.6 passou · 120 words, 0 banned, 1 question
Today we are introducing Prompt Cache, a new API gateway feature that stores reusable prompt prefixes and serves them across supported model providers. By recognizing identical system instructions, tools, examples, and context blocks, Prompt Cache reduces repeated input processing, lowers latency, and helps control token costs without changing application code. Teams can configure retention windows, cache keys, provider routing, encryption, and regional storage policies from one dashboard or API. What happens when a preferred provider is unavailable? The gateway can route requests to another provider while reusing eligible cached content, preserving performance and consistency. Built-in metrics report hit rates, savings, latency, and provider usage, while audit logs support governance. Prompt Cache is available today in public preview for all customers.
saída 628 tok (+473 raciocínio) latência 7.3 s
Respeito às restrições (limite de palavras, lista de palavras proibidas, uma única pergunta), a marca de estilo de cada modelo e o controle do tamanho.
Troque de um para o outro mudando uma linha
Os dois ids estão em todas as abas abaixo; o par de linhas destacado é a única alteração. O endpoint, a chave e o formato da requisição são os mesmos.
from openai import OpenAI
client = OpenAI(
base_url="https://synthorai.io/v1",
api_key="sk-syn-...",
)
resp = client.chat.completions.create(
model="claude-sonnet-5",
# model="gpt-5.6", # descomente esta linha, comente a linha acima
messages=[{"role": "user", "content": "Summarize this diff"}],
reasoning_effort="medium",
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://synthorai.io/v1",
apiKey: "sk-syn-...",
});
const resp = await client.chat.completions.create({
model: "claude-sonnet-5",
// model: "gpt-5.6", // descomente esta linha, comente a linha acima
messages: [{ role: "user", content: "Summarize this diff" }],
reasoning_effort: "medium",
});
console.log(resp.choices[0].message.content);curl https://synthorai.io/v1/chat/completions \
-H "Authorization: Bearer sk-syn-..." \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
# "model": "gpt-5.6", # descomente esta linha, comente a linha acima
"messages": [{"role": "user", "content": "Hello"}],
"reasoning_effort": "medium"
}'package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
)
func main() {
client := openai.NewClient(
option.WithBaseURL("https://synthorai.io/v1"),
option.WithAPIKey("sk-syn-..."),
)
resp, _ := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{
Model: "claude-sonnet-5",
// Model: "gpt-5.6", // descomente esta linha, comente a linha acima
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Summarize this diff"),
},
ReasoningEffort: openai.ReasoningEffortMedium,
})
fmt.Println(resp.Choices[0].Message.Content)
}import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.*;
import com.openai.models.ReasoningEffort;
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl("https://synthorai.io/v1")
.apiKey("sk-syn-...")
.build();
ChatCompletion resp = client.chat().completions().create(
ChatCompletionCreateParams.builder()
.model("claude-sonnet-5")
// .model("gpt-5.6") // descomente esta linha, comente a linha acima
.addUserMessage("Summarize this diff")
.reasoningEffort(ReasoningEffort.MEDIUM)
.build());
System.out.println(resp.choices().get(0).message().content().orElse(""));Perguntas frequentes
Qual é mais barato, Claude Sonnet 5 ou GPT-5.6?
Claude Sonnet 5 sai mais barato na linha “Entrada / 1M tokens” ($2 contra $5, 2.5× de diferença). Outras linhas podem pender para o outro lado: a tabela acima mostra todos os preços, e o custo real depende do seu mix de uso.
Posso fazer um teste A/B de Claude Sonnet 5 contra GPT-5.6 sem duas integrações?
Sim. Os dois são servidos pelo mesmo endpoint compatível com OpenAI, com uma única chave de API. Para trocar, basta mudar uma linha, a string do modelo; assim você pode direcionar uma parte do tráfego para cada um e comparar as contas diretamente.
Claude Sonnet 5 e GPT-5.6 suportam cache de prompts?
Sim. Os dois cobram as leituras de cache abaixo da tarifa de entrada, então cargas de trabalho com prefixo já em cache custam menos do que os preços de tabela sugerem. Os valores exatos de leitura de cache estão na tabela de preços acima.