Gemini 3.1 Pro vs GPT-5.2-Codex: price, context and capabilities

Choose Gemini 3.1 Pro for very long inputs, agentic coding, tool use and support agents and the latest release; on the other points the two are level or the data is missing.

In short

  • A price comparison is not possible: one of them has no comparable published price.
  • Gemini 3.1 Pro reads more per request: 1.05M tokens against 400k.
  • Gemini 3.1 Pro is the newer model (February 2026, against Jan 14, 2026).
  • Only Gemini 3.1 Pro offers prompt caching.

Open in the full comparison table

Which should you choose?

Each answer below comes straight from the published prices, specifications and independent benchmark results.

Very long inputs

Choose Gemini 3.1 Pro

Gemini 3.1 Pro reads up to 1.05M tokens per request, against 400k for GPT-5.2-Codex.

Agentic coding

Choose Gemini 3.1 Pro

Gemini 3.1 Pro scores 53.8% on Terminal-Bench Hard, against 37.1% for GPT-5.2-Codex.

Tool use and support agents

Choose Gemini 3.1 Pro

Gemini 3.1 Pro scores 95.6% on τ²-Bench (agentic tool use), against 92.1% for GPT-5.2-Codex.

Reasoning over long documents

Either one

They are practically level on Long-context reasoning (AA-LCR) (82% and 82.3%).

Latest release

Choose Gemini 3.1 Pro

Gemini 3.1 Pro is the newer release (February 2026, against Jan 14, 2026 for GPT-5.2-Codex).

Specifications side by side

Gemini 3.1 ProGPT-5.2-Codex
ProviderGoogleOpenAI
CategoryLanguage modelsLanguage models
StatusPreviewDeprecated
Headline price$4.50 / 1M tokensNo data
Input$2.00 / 1M tokensNo data
Output$12.00 / 1M tokensNo data
Cached input$0.20 / 1M tokensNo data
Context window1.05M400k
Max output66k128k
ReleasedFebruary 2026Jan 14, 2026
Knowledge cutoffNo dataAugust 2025
LicenceProprietaryProprietary
CapabilitiesVision, Reasoning, Tool calling, Structured output, Prompt caching, Batch APIVision, Reasoning, Tool calling, Structured output, Batch API
API model idgemini-3.1-pro-previewgpt-5.2-codex

Benchmarks side by side

Leader in bold.

BenchmarkGemini 3.1 ProGPT-5.2-Codex
Terminal-Bench Hard 53.8% 37.1%
GPQA Diamond 94.1% 89.9%
Humanity's Last Exam 47% 35.7%
IFBench (instruction following) 77.1% 77.6%
τ²-Bench (agentic tool use) 95.6% 92.1%
MMMU-Pro (visual reasoning) 82.4% 76.3%
Long-context reasoning (AA-LCR) 82% 82.3%
Intelligence Index 29.7 No data
SciCode 58.7% No data

Independent evaluations by Artificial Analysis, run the same way for every model, at the reasoning setting shown. Percentages unless marked as an index.

Frequently asked questions

Should I choose Gemini 3.1 Pro or GPT-5.2-Codex?

Choose Gemini 3.1 Pro for very long inputs, agentic coding, tool use and support agents and the latest release; on the other points the two are level or the data is missing.

Which is cheaper, Gemini 3.1 Pro or GPT-5.2-Codex?

A price comparison is not possible: one of them has no comparable published price.

Which has the larger context window, Gemini 3.1 Pro or GPT-5.2-Codex?

Gemini 3.1 Pro reads more per request: 1.05M tokens against 400k.

What is the difference between Gemini 3.1 Pro and GPT-5.2-Codex?

Gemini 3.1 Pro is made by Google and GPT-5.2-Codex by OpenAI. A price comparison is not possible: one of them has no comparable published price. Gemini 3.1 Pro reads more per request: 1.05M tokens against 400k. Gemini 3.1 Pro is the newer model (February 2026, against Jan 14, 2026). Only Gemini 3.1 Pro offers prompt caching.

Which is better for coding, Gemini 3.1 Pro or GPT-5.2-Codex?

Gemini 3.1 Pro scores 53.8% on Terminal-Bench Hard, against 37.1% for GPT-5.2-Codex.

Which is newer, Gemini 3.1 Pro or GPT-5.2-Codex?

Gemini 3.1 Pro was released on February 2026 and GPT-5.2-Codex on Jan 14, 2026.