AI model comparison
Gemini 3.1 Pro Preview vs GPT-5.4 Nano
Compare benchmark results, pricing, and API capabilities for each model. Estimate the cost of your own token mix.
Change models
- Context tokens
- 1.05M
- Input / 1M
- $2.00
- Output / 1M
- $12.00
OpenAI
GPT-5.4 Nano- Context tokens
- 400K
- Input / 1M
- $0.20
- Output / 1M
- $1.25
Percent score · Result source · Test method
The trade-offs
Start with the differences that affect how this model fits your workload.
- Benchmark results
- Gemini 3.1 Pro Preview and GPT-5.4 Nano scored 78.261% and 67.391%, 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 $5.00 for Gemini 3.1 Pro Preview and $0.5125 for GPT-5.4 Nano.
- Context window
- Gemini 3.1 Pro Preview lists 1,048,576 tokens of context. GPT-5.4 Nano lists 400,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.
Source Result source · Test method
Code Completion
Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Code Generation
Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Javascript
Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Python
Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Typescript
Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Amps Hard
Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Connections
Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Consecutive Events
Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Show 15 more shared results
Integrals With Game
Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Logic With Navigation
Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Math Comp
Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Olympiad
Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Paraphrase
IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Plot Unscrambling
Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Simplify
IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Spatial
Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Story Generation
IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Summarize
IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Tablejoin
Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Tablereformat
Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Theory Of Mind
Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Typos
Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Zebra Puzzle
Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- Gemini 3.1 Pro Preview
- gemini-3.1-pro-preview-high
- GPT-5.4 Nano
- gpt-5.4-nano-xhigh
Pricing and token cost
Listed OpenRouter prices in US dollars. Actual charges depend on the endpoint, tier, cache, and token mix.
| USD per million tokens | Gemini 3.1 Pro Preview | GPT-5.4 Nano |
|---|---|---|
| Uncached input | $2.00 | $0.20 |
| Output | $12.00 | $1.25 |
| Cache read | $0.20 | $0.02 |
| Cache write | $0.375 | Unavailable |
Rates are a catalog snapshot. OpenRouter Models API
Estimate your workload
Enter total token counts. The estimate uses uncached input and output rates.
GPT-5.4 Nano costs $4.4875 less at this token mix.
Model specifications
Context, output limits, modalities, and supported API parameters from the catalog.
| Specification | Gemini 3.1 Pro Preview | GPT-5.4 Nano |
|---|---|---|
| Catalog status | Listed | Listed |
| Catalog model ID | google/gemini-3.1-pro-preview | openai/gpt-5.4-nano |
| Provider | OpenAI | |
| Context window | 1,048,576 tokens | 400,000 tokens |
| Max output | 65,536 tokens | 128,000 tokens |
| Input modalities | Audio, File, Image, Text, Video | File, Image, Text |
| Output modalities | Text | Text |
| Reasoning controls | Listed | Listed |
| Tool calling | Listed | Listed |
| Structured outputs | Listed | Listed |
| 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 date | Feb 19, 2026 | Mar 17, 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.
Gemini 3.1 Pro Preview
Weave Router availability is unverified for this model ID.
GPT-5.4 Nano
Listed in the public Router catalog.
gpt-5.4-nanoCatalog presence does not guarantee availability for a specific plan or account. Public Weave Router catalog · Nov 27, 2026
Sources
Each benchmark links to its own result and test method when available.
- OpenRouter Models API · token rates and catalog specifications
- Weave Router catalog · verified Router model IDs
- Gemini 3.1 Pro Preview catalog entry
- GPT-5.4 Nano catalog entry