Model Benchmark • 841 words • 4 min read

2026 Mainstream Foundation Models Comparison: GPT-5.4 vs Claude Opus 4.6 vs Gemini 3.1 Pro

Compare GPT-5.4, Claude 4.6, and Gemini 3.1 Pro APIs with sourced capabilities, token prices, SDK examples, fair evaluation rules, and self-hosting cost formulas.

NOTE

Executive Summary (TL;DR)

  • 2026 Frontier Landscape: Comprehensive comparison across frontier closed models (GPT-5.4, Claude 4.6, Gemini 3) and open-weights leaders (DeepSeek-V4, Kimi K3) across pricing and benchmarks.
  • Rigorous Fact Checks: Confirms official Claude Opus 4.6 pricing at $5/$25 per million tokens, and verifies GPT-5.4 modalities (text and vision inputs without direct fine-tuning support).
  • Specialized Deep Dive: For national open-source model ecosystems, consult the 2026 Domestic LLM Comprehensive Benchmark Report.

Scope and evidence

This comparison preserves the GPT-5.4, Claude Opus / Sonnet 4.6, and Gemini 3.1 Pro group. It is an engineering reference, not a claim that these are today's newest models. Specifications come from provider documentation; unsupported score tables are not treated as controlled measurements. See the Chinese open-weight comparison.

1. Capabilities and API boundaries

ModelInput and outputContextEngineering checks
GPT-5.4Text / image input, text output; no direct audio input1.05M total window, up to 128K output; shared input / output budgetReasoning effort, Responses tools, computer use
Claude Opus / Sonnet 4.6Text / image input; document processing supports PDFConsult each model's 1M-context conditionsAdaptive thinking, tool parameters, available model IDs
Gemini 3.1 Pro PreviewMultimodal understanding; check exact supported input formatsLimits depend on the Preview IDMedia accounting, tools, thinking configuration

Sources: GPT-5.4, Opus 4.6, Sonnet 4.6, Gemini 3.1 Pro Preview.

ChatGPT's Thinking label is not a separate gpt-5.4-thinking API ID. Claude Code Agent Teams is a harness capability rather than automatic multi-agent orchestration in the base API. Distinguish API thinking parameters from separate consumer product modes.

2. Traceable token prices

Standard examples below are USD per million tokens. Account separately for long-context rates, cache writes, batch processing, regions, and tools.

ModelInputOutputCached input
GPT-5.42.5015.000.25
Claude Opus 4.65.0025.000.50 cache read
Claude Sonnet 4.63.0015.000.30 cache read
Gemini 3.1 Pro PreviewCheck input-length tierCheck input-length tierCheck cache and storage rates

Sources: OpenAI model pricing, Claude model documentation, Gemini pricing. GPT-5.4 applies long-context multipliers above 272K input tokens, so the standard rate cannot be applied to every million-token request.

3. Fair reasoning, coding, and agent comparisons

SWE-bench Verified, HumanEval, OSWorld, and mathematics tests measure different capabilities. Do not place Opus results in a Sonnet column or describe provider-specific harness results as one uniform reproduction.

Pin the snapshot, reasoning budget, context, tool permissions, agent harness, timeout, and retries. Save patches, execution logs, and independent acceptance results. Compare quality, latency, and useful cost; see LLM evaluation.

WorkloadAcceptance evidence
Repository changesHidden tests, patch scope, repeated-run stability
Document extractionNumeric accuracy, citations, retrieval, refusals
Computer operationReset environment, success rate, unauthorized actions, duration
Video / audio understandingSupported modality, temporal grounding, quality, cost

A large window does not establish complete repository understanding. A reported hallucination reduction on one evaluation is not a fixed improvement for all workloads.

4. API examples

These examples require provider SDKs, credentials, and account access. Site verification does not call external models.

PYTHON
from openai import OpenAI

client = OpenAI()
response = client.responses.create(
    model="gpt-5.4",
    input="Explain the basics of quantum computing",
    reasoning={"effort": "high"},
    max_output_tokens=4096,
)
print(response.output_text)
PYTHON
import anthropic

client = anthropic.Anthropic()
response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=4096,
    messages=[{"role": "user", "content": "Explain quantum computing"}],
)
print(response.content)
PYTHON
from google import genai

client = genai.Client()
response = client.models.generate_content(
    model="gemini-3.1-pro-preview",
    contents="Explain quantum computing",
)
print(response.text)

Check IDs against your account's model list. Provider routing also needs consistent errors, deadlines, tool schemas, and usage accounting.

5. Self-hosting arithmetic and KV budgets

At an assumed $30/hour server cost and blended $5 per million API tokens, a simplified break-even point is 30 / 5 × 1e6 / 3600 = 1,667 tokens/s. This is not measured capacity or equivalent task quality. Input / output mix, utilization, expansion, and staffing change the result. See deployment cost estimation.

For ordinary GQA with 80 layers, 8 KV heads, head_dim=128, and FP16, cache bytes per token are 2×80×8×128×2=327,680. One million tokens require about 327.68GB or 305.18GiB. This is a defined example, not a rule for all 70B or hybrid models. PagedAttention improves allocation and reuse, not the size of an uncompressed KV element.

Frequently Asked Questions (FAQ)

Q1: Which model is strongest at coding?

Compare matching repository tasks, tools, and budgets. Provider benchmarks screen candidates; independent acceptance determines fit.

Q2: Does a million-token window guarantee accurate retrieval?

No. Capacity, retrieval quality, citation reliability, and cost need separate measurements.

Q3: How should cost and reliability be balanced?

Set minimum quality and SLA first, then compare useful cost. The token calculator helps separate input, output, and cache charges.

Related Articles

Start with the same topic, then continue with the latest deep dives.

Kimi K3 vs GLM-5.3 vs DeepSeek-V4: Architecture, Benchmarks and Deployment

Compare Kimi K3, GLM-5.3, and DeepSeek-V4-Pro with sourced architecture facts, matching benchmark versions, checkpoint formats, and workload evaluation plans.

Reject Benchmark Hacking: How to Build an LLM Evaluation System for Your Business (LLM-as-a-Judge)

Cease the obsession with writing more code; shift focus to deep evaluation thinking. We deconstruct LLM-as-a-Judge biases, the mathematics behind metrics, and reshaping CI/CD defenses for probabilistic systems.

The Critical Crossroads in AI History: Why Was *That One* Chosen Every Time?

A retrospective of six pivotal technology crossroads in AI's seventy-year history, dissecting the compute constraints, data dividends, and scalability logic behind each historical choice.

← Prev Multimodal AI Models Starter Guide Next → Retrieval-Augmented Generation (RAG) in Practice: Strategies & Production Best Practices
← Back to Articles