AI model comparison

Claude Opus 4.7 vs Gemini 3.1 Pro Preview

Compare benchmark results, pricing, and API capabilities for each model. Estimate the cost of your own token mix.

Change models
Loading the catalog…
Markdown
Context tokens
1M
Input / 1M
$5.00
Output / 1M
$25.00
Context tokens
1.05M
Input / 1M
$2.00
Output / 1M
$12.00
Benchmark snapshot
Code Completion
Claude Opus 4.7Gemini 3.1 Pro Preview
78.261%
78.261%

Percent score · Result source · Test method

Catalog checked Nov 27, 202623 shared benchmark resultsRead the methodology

The trade-offs

Start with the differences that affect how this model fits your workload.

Benchmark results
Claude Opus 4.7 and Gemini 3.1 Pro Preview scored 78.261% and 78.261%, respectively, on Code Completion. Use the test setup below to check whether it matches your workload.
Token cost
For 1 million input tokens and 250,000 output tokens, the listed rates estimate $11.25 for Claude Opus 4.7 and $5.00 for Gemini 3.1 Pro Preview.
Context window
Gemini 3.1 Pro Preview lists 1,048,576 tokens of context. Claude Opus 4.7 lists 1,000,000 tokens. Reserve space for the output before routing long inputs.

Benchmarks

Shared results come from the same published benchmark release. Reasoning effort and serving configuration can differ.

Shared benchmark profilePercentage scores from the first eight shared groups, sorted by the page evidence order.

Source Result source · Test method

Claude Opus 4.7Gemini 3.1 Pro Preview

Code Completion

Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

78.261%
78.261%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Code Generation

Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

85.915%
74.648%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Javascript

Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

63.636%
59.091%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Python

Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

45%
50%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Typescript

Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

43.333%
23.333%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Amps Hard

Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

98%
98%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Connections

Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

92.333%
100%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Consecutive Events

Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

89.521%
85.239%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high
Show 15 more shared results

Integrals With Game

Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

84%
78%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Logic With Navigation

Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

70%
72%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Math Comp

Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

98.039%
96.078%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Olympiad

Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

91.376%
92.102%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Paraphrase

IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

65.767%
79.867%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Plot Unscrambling

Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

61.409%
74.128%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Simplify

IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

65.5%
71.05%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Spatial

Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

100%
98%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Story Generation

IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

69.4%
77.25%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Summarize

IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

66.283%
88.233%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Tablejoin

Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

47.231%
52.346%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Tablereformat

Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

98.039%
98.039%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Theory Of Mind

Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

80.769%
80.769%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Typos

Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

80%
82%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Zebra Puzzle

Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

98%
85.25%
Test configurations
Claude Opus 4.7
claude-opus-4-7-xhigh-effort
Gemini 3.1 Pro Preview
gemini-3.1-pro-preview-high

Pricing and token cost

Listed OpenRouter prices in US dollars. Actual charges depend on the endpoint, tier, cache, and token mix.

USD per million tokensClaude Opus 4.7Gemini 3.1 Pro Preview
Uncached input$5.00$2.00
Output$25.00$12.00
Cache read$0.50$0.20
Cache write$6.25$0.375

Rates are a catalog snapshot. OpenRouter Models API

Estimate your workload

Enter total token counts. The estimate uses uncached input and output rates.

Claude Opus 4.7$11.25
Gemini 3.1 Pro Preview$5.00

Gemini 3.1 Pro Preview costs $6.25 less at this token mix.

Model specifications

Context, output limits, modalities, and supported API parameters from the catalog.

SpecificationClaude Opus 4.7Gemini 3.1 Pro Preview
Catalog statusListedListed
Catalog model IDanthropic/claude-opus-4.7google/gemini-3.1-pro-preview
ProviderAnthropicGoogle
Context window1,000,000 tokens1,048,576 tokens
Max output128,000 tokens65,536 tokens
Input modalitiesText, Image, FileAudio, File, Image, Text, Video
Output modalitiesTextText
Reasoning controlsListedListed
Tool callingListedListed
Structured outputsListedListed
Serving endpoints/api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses/api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses
Catalog listing dateApr 16, 2026Feb 19, 2026

Use with Weave Router

Set a quality bar on your own coding tasks. Then compare cost per completed task and use the same harness when you change models.

Claude Opus 4.7

Listed in the public Router catalog.

claude-opus-4-7

Gemini 3.1 Pro Preview

Weave Router availability is unverified for this model ID.

Catalog presence does not guarantee availability for a specific plan or account. Public Weave Router catalog · Nov 27, 2026

Explore Weave Router Read Weave Router benchmark results

Sources

Each benchmark links to its own result and test method when available.

MarkdownFull methodology