GLM-5.2 is live — Z.AI's flagship with a 1M-token lossless contextfrom $0.900 per 1M tokens
Which Claude Model Is Best for Coding and for Writing
2026/07/27

Which Claude Model Is Best for Coding and for Writing

Which Claude model is best for coding depends on the benchmark: Fable 5 tops SWE-Bench Pro, Opus 5 wins agentic terminal work and costs a third as much.

"Which Claude model is best for coding" has a different answer depending on whether you mean the highest benchmark score, the best result per dollar, or the model that will not surprise you at 2am. Those are three different models.

The published numbers settle more of it than people expect, including one row where Anthropic's own table shows its flagship losing.

TL;DR

  • Highest agentic-coding score: Claude Fable 5 at 80.3% on SWE-Bench Pro[1].
  • Best default for most teams: Claude Opus 5, which Anthropic positions for complex agentic coding and enterprise work[2].
  • Opus 5 loses one coding row. GPT-5.6 Sol takes DeepSWE v1.1, 72.7% against 68.8%, in Anthropic's own table[3].
  • For writing, the ranking inverts toward knowledge work, where Opus 5 leads GDPval-AA v2 at 1861[3].
  • Effort matters more than model choice below the frontier: low and medium on Opus 5 hold up unusually well[2].
  • On reAPI, Opus 5 costs less than Fable 5 by a wide margin, which changes the trade.

The coding numbers

Three coding benchmarks with three different winners: Fable 5 on SWE-Bench Pro, Opus 5 on Frontier-Bench, and GPT-5.6 Sol taking DeepSWE, plus the knowledge-work row where the ranking inverts

Three models are in serious contention. Here is what Anthropic published for each.

BenchmarkFable 5Opus 5Opus 4.8
SWE-Bench Pro (agentic coding)80.3%n/a69.2%
FrontierCode Diamond (hardest coding)29.3%53.4%†13.4%
Terminal-Bench 2.188.0%*n/a82.7%
Frontier-Bench v0.1 (agentic terminal)33.7%43.3%21.1%
DeepSWE v1.1 (agentic coding)69.7%68.8%59.0%

* A starred row is one where Anthropic notes the public Fable 5 diverges from the unrestricted sibling because safety classifiers trigger; expect the model you can actually call to land closer to Opus 4.8 there[1]. † FrontierCode v1.1 Main, a different cut of the benchmark than the Diamond subset in the Fable 5 column, so read down the column rather than across this row.

Two conclusions survive that table.

Fable 5 is the top of the coding board where the benchmarks are directly comparable, and by a real margin on SWE-Bench Pro[1].

Opus 5 wins the newer agentic-terminal benchmark decisively, more than doubling Opus 4.8's Frontier-Bench score[3].

The row Anthropic left in

On DeepSWE v1.1, Anthropic's own comparison table puts GPT-5.6 Sol at 72.7% against Opus 5's 68.8%[3]. That is the clearest coding loss on the board, and it lands on exactly the workload Opus 5 is marketed for.

It is worth taking seriously rather than explaining away. If your evaluation resembles DeepSWE, a competitor scores higher on the vendor's own numbers. If it resembles long-horizon terminal work, Opus 5 wins the same table by nine points over that competitor.

The lesson is not that one model is better. It is that "best for coding" resolves differently depending on which coding benchmark matches your work.

Which one for writing

Ask the writing question and the ranking reorganizes, because writing lives closer to knowledge work than to code.

BenchmarkOpus 5Fable 5Opus 4.8
GDPval-AA v2 (knowledge work, Elo)186117471593
Humanity's Last Exam, no tools56.3%56.5%49.8%
Humanity's Last Exam, with tools64.7%63.9%57.9%

Opus 5 leads knowledge work by 114 Elo over Fable 5[3]. On reasoning without tools the two are a statistical tie.

For drafting, editing, and synthesis, that GDPval gap is the relevant signal, and it points at Opus 5 rather than the model that tops the coding board.

The variable that beats model choice

Below the frontier, effort level moves results more than switching models does.

Anthropic describes Opus 5 as converting additional effort into better results more reliably than any earlier Opus model, and separately notes that low and medium produce strong quality at a fraction of the tokens and latency[2]. The official guidance is to start at the default high and sweep in both directions against your own evaluations.

That has a practical consequence for this whole question. A team that picks the "best" model and leaves effort at an inherited default is often getting worse results, more slowly, than a team on the tier below that tuned the dial.

What it costs on reAPI

Model choice is a cost decision as much as a capability one.

ModelInput / output per 1M tokens
Claude Fable 5$8.00 / $40.00
Claude Opus 5$2.40 / $12.00
Claude Opus 4.8$4.00 / $20.00
Claude Sonnet 4.6$2.40 / $12.00

Fable 5 costs more than three times Opus 5 on the same gateway. That reframes the coding question: Fable 5's SWE-Bench Pro lead is real, and you are paying over 3x for it, on a model that also carries mandatory 30-day retention and a refusal layer[1].

For most teams that trade does not clear. For a repo-scale migration where a failed run costs more than the tokens, it can.

Picking

Default to Opus 5. Best knowledge-work score, decisive on the newer agentic-terminal benchmark, and the cheapest of the three on this gateway.

Reach for Fable 5 when the task is long-horizon and hard and you have measured it winning on your own work. The FrontierCode curve is the honest argument: on the hardest problems, extra effort keeps buying accuracy where other models flatten[1].

Stay on Opus 4.8 when your evaluations are already calibrated to it, or when you need thinking disabled at high effort levels, which Opus 5 rejects[2].

Consider a non-Claude model if your workload looks like DeepSWE. The vendor's own table says so.

from openai import OpenAI

client = OpenAI(api_key="YOUR_REAPI_KEY", base_url="https://api.reapi.ai/v1")

resp = client.chat.completions.create(
    model="claude-opus-5",
    messages=[{"role": "user", "content": "Refactor this module and add tests."}],
    max_tokens=16000,
    stream=True,
)

Switching between them is a model-string change on one key. Rates are on reapi.ai/models.

FAQ

Which Claude model is best for coding?

Fable 5 tops the directly comparable coding benchmarks, notably SWE-Bench Pro at 80.3%[1]. Opus 5 wins the newer agentic-terminal benchmark and costs far less, which makes it the better default for most teams[3].

Which Claude model is best for writing?

Opus 5. It leads knowledge work on GDPval-AA v2 at 1861 Elo, 114 ahead of Fable 5[3].

Does Claude beat GPT for coding?

Not on every benchmark. Anthropic's own table shows GPT-5.6 Sol taking DeepSWE v1.1 at 72.7% against Opus 5's 68.8%, while Opus 5 leads the same table on agentic terminal work[3].

Is Fable 5 worth three times the price?

Only when the task is hard enough that its effort curve pays for itself. It also carries mandatory 30-day data retention and a classifier refusal layer that Opus 5 does not[1].

Does effort level matter more than model choice?

Below the frontier, often yes. Opus 5 converts extra effort into results more reliably than earlier Opus models, and its low and medium settings hold up unusually well[2].

Which model should I use for code review specifically?

Opus 5, with one caveat from Anthropic's guidance: it follows severity filters literally, so asking only for high-severity issues depresses what it reports. Ask for everything with confidence labels and filter downstream[2].

Is Sonnet good enough for coding?

For high-volume work where cost per turn dominates, often yes. On reAPI Sonnet 4.6 costs the same as Opus 5, which removes the price argument for choosing it.

How do I switch between them?

One model string on one key, if you call them through a gateway rather than per-vendor accounts.

Matching the model to the benchmark that matches your work

The honest answer to which Claude model is best for coding is that the question is underspecified. Fable 5 tops the classic coding benchmarks. Opus 5 tops the newer agentic-terminal one, leads knowledge work outright, and costs a third as much. A competitor beats both on one row that Anthropic published anyway.

So pick the benchmark that resembles your actual work, then read that row. And before switching models at all, sweep the effort dial on the one you already have, because below the frontier that moves results more than the model name does.

References

  1. reAPI. How to use Claude Fable 5 — benchmark table, effort curve, refusal layer, and retention. reapi.ai/blog/how-to-use-claude-fable-5
  2. Anthropic. What's new in Claude Opus 5 — effort guidance, behavior changes, and capability improvements. Retrieved July 2026 from platform.claude.com/docs/en/about-claude/models/whats-new-opus-5
  3. reAPI. How to use Claude Opus 5 — the full published benchmark table. reapi.ai/blog/how-to-use-claude-opus-5

Further reading