◈AI Codex
Compare→Claude vs GPT-6 for Coding

Comparison · verified November 2, 2026

Claude vs GPT-6 for Coding

Both families are close enough on coding that the model is rarely what decides your outcome. On Anthropic’s own charts Opus 5.5 leads Astra on Terminal-Bench 4.0 and only narrowly on FrontierCode, while Astra leads on Terminal-Bench-Science. Neither vendor runs the other’s harness.

So this page does something more useful than declaring a winner. It gives you the verified specs, labels every performance claim with who made it, names the billing details that move your bill more than model choice does, and shows you how to run the only comparison that settles the question for your codebase.

The verified differences

Claude
GPT-6

Flagship for coding

Claude Opus 5.5 — Anthropic’s default flagship for agentic coding. Claude Fable 5.1 sits above it for the hardest work at $10 / $50.

GPT-6 Astra — OpenAI’s flagship since September 2026. GPT-6.1 Sol is the everyday tier, Terra the cheaper mid tier, Luna the low-cost one.

Price (input / output per MTok)

Fable 5.1 $10 / $50 · Opus 5.5 $4 / $20 · Sonnet 5.5 $2 / $10 · Haiku 5.5 from $0.10 / $0.50

Astra $10 / $50 · 6.1 Sol $2 / $10 · 6.1 Terra $1 / $5 · Luna $0.10 / $0.50

Long-context billing

Fable, Opus and Sonnet bill the full 1M-token window at standard rates. A 900k-token request costs the same per token as a 9k one. Haiku 5.5 steps up above 100K tokens.

OpenAI bills long requests at a higher rate. On Astra the step is at 272K tokens and applies to the whole request.

Context window

1M tokens on every current model.

About 1.05M tokens on Astra.

Max output

128k tokens on every current model.

Varies by tier. Check OpenAI’s model page before assuming parity on long generations.

Knowledge cutoff

June 2026 (reliable) across Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5.

Check OpenAI’s published cutoff per tier. For library and framework work this matters more than most benchmark deltas.

Reasoning control

Adaptive thinking on every model. Default `effort` is high on Sonnet 5.5 and Fable 5.1, medium on Opus 5.5. Set it explicitly to trade quality against latency and spend.

Reasoning effort is configurable per request.

Terminal / agentic coding tool

Claude Code — terminal, IDE, desktop and web, with subagents, Skills, hooks, and cloud sessions. Opus 5.5 is its default Opus model.

Codex — CLI, IDE and cloud, also available on AWS Bedrock.

Where you can deploy it

Claude API, Amazon Bedrock, Claude Platform on AWS, Google Cloud Vertex AI, Microsoft Foundry.

OpenAI API, Azure, and AWS Bedrock.

What each one costs

Last verified November 2, 2026

USD per million tokens, standard rates, no discounts applied. Read the three caveats underneath before you put these numbers in a spreadsheet.

ModelTierInputOutputNotes
Claude Fable 5.1frontier$10$50The frontier model, for long-running agents and the hardest reasoning. Cache hits are 2.5% of input.
Claude Opus 5.5frontier$4$20The default flagship. Cheaper than Opus 5 ($5/$25). Fast mode is $8/$40.
Claude Sonnet 5.5balanced$2$10What most production agent fleets run on. Replaces Sonnet 4.5, which retires November 30, 2026.
Claude Haiku 5.5fast$0.10$0.50High-volume and latency-sensitive work. Prompts over 100K tokens meter at $0.50/$2.50.
GPT-6 Astrafrontier$10$50OpenAI’s flagship since September 2026. Requests over 272K tokens are billed at a higher rate for the whole request.
GPT-6.1 Solbalanced$2$10The everyday tier, shipped at DevDay on September 29, 2026.
GPT-6.1 Terrabalanced$1$5A cheaper mid tier.
GPT-6 Lunafast$0.10$0.50The low-cost tier. Same list price as Claude Haiku 5.5.

Anthropic changed tokenizers at Claude 4.7

Claude 4.7 and later, including every 5.x model, use a newer tokenizer that produces roughly 30% more tokens for the same text than Sonnet 4.6 and earlier. A $2/MTok model on the new tokenizer is not directly comparable to a $2/MTok model on an older one, or to another vendor. Compare cost per task, not cost per token.

Long context costs extra on some models

GPT-6 Astra bills the whole request at a higher rate once it passes 272K tokens, Gemini 3.1 Pro charges more for prompts over 200K tokens, and Claude Haiku 5.5 charges more for prompts over 100K tokens. Claude Fable, Opus and Sonnet include the full 1M-token window at standard pricing, so a 900k-token request costs the same per token as a 9k one. If your workload is context-heavy, check the long-context rate before the headline rate.

Google’s current rates are introductory

Gemini 4 Argon doubles to $4/$20 on December 1, 2026, and Gemini 3.8 Flash doubles to $1.50/$7.50 on January 1, 2027. If you are building a twelve-month cost model, use the later numbers, not the ones on the page today.

Caching and batching move the number more than model choice

A Claude cache hit costs 10% or less of the standard input price (2.5% on Fable 5.1), and the Batch API takes 50% off both directions; the two stack. A workload that reuses a large system prompt can land below a nominally cheaper model that you are calling uncached. Model selection is usually the third-largest lever, after caching and after not sending the context at all.

What the evidence says, and who is saying it

Almost every performance number in public circulation traces back to a vendor running its own harness. That does not make the numbers useless, but the attribution belongs next to the claim.

Anthropic, Claude Opus 5.5 announcement (September 22, 2026), as reported

  • Terminal-Bench 4.0 — Opus 5.5 66.4%, GPT-6 Astra 57.9%.
  • FrontierCode v1.1 — Opus 5.5 54.4%, Astra 53.3%.
  • Humanity’s Last Exam with tools — Opus 5.5 67.7%, Astra 57.2%.
  • Terminal-Bench-Science — Astra 64.6%, Opus 5.5 58.7%.

These are Anthropic’s numbers from Anthropic’s harness. Anthropic also said its safeguards rerouted some cyber and biology tasks to older models during evaluation. The FrontierCode gap is about one point, which is inside the noise of most real-world tests.

Run the comparison that actually decides it

A benchmark measures performance on someone else’s repository. Yours has its own conventions, its own dependency graph, and its own particular way of being confusing. An afternoon of measurement beats a month of reading comparisons.

  1. Pull 20 real tasks from your own history. Closed bug tickets with a known correct fix are ideal, because the answer already exists and you did not write it for the test.
  2. Fix the harness and vary only the model. Same prompt, same context, same tools. Most published comparisons fail here, which is a large part of why they disagree.
  3. Score on your bar, not a leaderboard’s. Did it pass review? Did it need a second round? Would you have merged it?
  4. Record cost per completed task, not per token. With different tokenizers and long-context pricing, per-token price tells you very little about the bill.
  5. Re-run it when either vendor ships. Both vendors shipped a new flagship in September 2026 alone. A result from the summer is a historical note.

How to evaluate your agents covers the test-set design, and auditing your eval suite covers what to do when the suite stops catching things.

The honest bottom line

Pick Claude if your work is repository-scale: large refactors, reasoning across many files, and long agentic sessions where a 1M-token window at flat pricing changes what is affordable. Opus 5.5 costs less than half of Astra per token, and Claude Code is the more developed terminal agent.

Pick GPT-6 if you are already inside the OpenAI ecosystem or on Codex, or if your own test shows Astra ahead on your kind of work. At the everyday tier the prices are now identical: GPT-6.1 Sol and Sonnet 5.5 both cost $2 / $10, and Luna matches Haiku 5.5 at $0.10 / $0.50.

Use both if you are running anything at scale. Routing cheap work to Haiku 5.5 or Luna and hard reasoning to Opus 5.5 or Astra costs less than standardising on one flagship, and the two APIs are similar enough that the abstraction is about a day of work. Vendor lock-in on a model that may be retired within a year is a risk you can decline. See when your AI model disappears.

Related

Haiku vs Sonnet

Which Claude tier for which job.

Choosing the right Claude model

Fable, Opus, Sonnet and Haiku, and when each earns its price.

Cutting Claude API cost

Caching and batching move the bill more than model choice.

Cost calculator

Model your monthly spend by volume and caching strategy.