Spec comparison
| Spec | Gemini 3.1 Pro | Claude Opus 4.7 |
|---|---|---|
| Input price (per 1M) | $3.50 | $5.00 |
| Output price (per 1M) | $10.50 | $25.00 |
| Context window | 2M tokens | 1M tokens |
| Arena Elo (latest) | 1500 | 1497 |
| Coding Elo | 1521 | 1567 |
| GPQA Diamond | 94.3% (#1) | 90.8% |
| SWE-bench Pro | 58.2% | 64.3% |
| MMLU | 92.0 | 91.2 |
| Best for | Multimodal, long-context, science | Coding, agents, refusals |
Feature matrix
| Capability | Gemini 3.1 | Opus 4.7 |
|---|---|---|
| Tool / function calling | ✓ | ✓ |
| Vision (image input) | ✓ | ✓ |
| Video input (native) | ✓ | ✗ |
| Audio input (native) | ✓ | ~ |
| 2M+ token context | ✓ | ✗ |
| Computer use (agent) | ~ | ✓ |
| Prompt caching | ✓ | ✓ |
| Batch API discount | ✓ | ✓ |
| Native PDF parsing | ✓ | ✓ |
| Code execution sandbox | ✓ | ✓ |
| Top-tier on GPQA Diamond | ✓ | ~ |
| Top-tier on SWE-bench Pro | ~ | ✓ |
| Grounding via Google Search | ✓ | ✗ |
| Real-time multimodal API | ✓ | ✗ |
| Open weights | ✗ | ✗ |
Cost analysis
| Workload | Gemini 3.1 Pro | Opus 4.7 | Gemini saves |
|---|---|---|---|
| 10K in / 1K out | $0.046 | $0.075 | 39% |
| 200K in / 5K out (long doc) | $0.753 | $1.125 | 33% |
| 100K in / 20K out (coding) | $0.560 | $1.000 | 44% |
| 1M in / 10K out (extreme context) | $3.605 | $5.250 | 31% |
When Gemini 3.1 Pro wins
Gemini wins for anything multimodal: native video + audio + image + text in a single call is unmatched. Meeting transcript analysis, video QA, surveillance triage, and any product that consumes raw media at scale should default to Gemini. The 2M-token context is genuinely useful for retrieval over codebases or document corpora that do not fit in 1M. GPQA Diamond at 94.3% (#1 globally) means any scientific reasoning workload (pharma research, physics QA, formal-methods agents) should run on Gemini first. Pricing is the kicker: at roughly 2-2.4x cheaper than Opus 4.7 on equivalent workloads, Gemini also wins on volume-bound use cases where the price-per-quality ratio dominates. The Vertex grounding-with-Google integration is also a big deal for fact-heavy applications: you get web search citations baked into the response without separate tool wiring.
When Claude Opus 4.7 wins
Opus 4.7 wins for coding (SWE-bench Pro 64.3% vs Gemini 58.2%), agentic tool-use, and computer-use. For multi-file refactors, codebase analysis, and engineering workflows, the Elo gap of 46 points on coding is substantial: translating to fewer broken PRs in production. Opus 4.7's computer-use agent (driving a browser/desktop) is the best in the market and is what powers most production AI coding assistants. Refusal behaviour is more conservative, which legal and medical teams prefer. Long-context reasoning (not just retrieval) holds up better deep into the window. And the Anthropic SDK and tool-calling format are simpler to integrate cleanly than Vertex's SDK surface. If your workload shape is "agent loops, code, refusals matter," Opus 4.7 is the right default.
The common combination
The smart pattern: Gemini 3.1 Pro for ingest (multimodal parse, long-doc summarization, scientific QA) and Opus 4.7 for downstream agent work. A typical RAG-plus-agent pipeline pre-processes 200K-2M-token inputs through Gemini for a structured summary, then hands the summary to Opus for reasoning, code, or tool use. Cost drops 40-60% versus running everything on Opus, with no measurable quality regression.Swfte's router ships this pattern as a default for any multimodal workload, with provider-agnostic failover so a deprecated model does not become a P0.
How to choose
- Classify your traffic: how much is multimodal? how much is code? how much is reasoning? Per-class winners diverge.
- Run a 200-prompt eval on each model. Score on quality, latency, and cost; the cheapest passing model wins.
- If long-context is core, test recall at your real input size: both models claim it but Gemini holds further.
- For coding-heavy stacks, default to Opus 4.7 and only escalate science queries to Gemini.
- For media-heavy stacks, default to Gemini and route coding to Opus.
- Keep prompts portable. The model gap moves; lock-in compounds.
Frequently asked questions
Is Gemini 3.1 Pro or Claude Opus 4.7 better right now?
Gemini 3.1 Pro leads on GPQA Diamond (94.3%, #1 globally), multimodal (video + audio native), and 2M-token context. Opus 4.7 leads on coding (SWE-bench Pro 64.3%), agentic tool use, and refusal quality. Both sit at ~1500 on Arena overall: pick by workload.
Why is Gemini 3.1 Pro so much cheaper?
Gemini 3.1 Pro is $3.50 input / $10.50 output per 1M tokens versus Opus 4.7 at $5.00 / $25.00. Google subsidizes inference aggressively to drive Vertex AI adoption, and TPU v5p economics let them undercut. On a 70/30 split that is roughly 2.4x cheaper.
Is the 2M context window actually usable?
Yes for retrieval-style queries: Gemini 3.1 Pro maintains needle-in-haystack recall above 95% out to 2M tokens. For deep reasoning across the full window, performance degrades past ~800K. Opus 4.7 maintains reasoning quality deeper into its 1M window than Gemini does into its 2M.
Which is better for coding?
Claude Opus 4.7. The 64.3% SWE-bench Pro and 1567 coding Elo are well above Gemini 3.1 Pro's 58.2% and 1521. The gap shows up most clearly on multi-file refactors and tool-use loops. Gemini holds up well on isolated function-level coding but trails on agent-shaped work.
When should I pick Gemini for a multimodal app?
Almost always. Native video + audio + image + text in one call, plus 2M context, plus aggressive pricing: the multimodal stack is its single biggest moat. Anthropic does not currently offer comparable native video understanding. For meeting analysis, video QA, or surveillance, Gemini wins.
