Skip to content

Gemini 3.1 Pro Preview

Gemini 3.1 Pro Preview advances software engineering and agentic workflows with targeted quality improvements for finance and spreadsheet applications, plus more efficient thinking that reduces token consumption while maintaining performance.

File InputTool UseReasoningVision (Image)Web Searchtiered-costImplicit Caching
index.ts
import { streamText } from 'ai'
const result = streamText({
model: 'google/gemini-3.1-pro-preview',
prompt: 'Why is the sky blue?'
})

Playground

Try out Gemini 3.1 Pro Preview by Google. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

About Gemini 3.1 Pro Preview

Gemini 3.1 Pro Preview is the updated flagship in the Gemini 3.1 family, building directly on Gemini 3 Pro with quality improvements targeted at real-world production domains. Software engineering and agentic workflows are the primary areas of improvement, alongside enhanced usability for finance and spreadsheet applications.

The model introduces more efficient thinking. At the pro tier, input tokens are a significant cost factor in long agentic sessions. Better reasoning efficiency means the model works through complex tasks without generating proportionally more tokens, directly reducing per-task operating cost compared to Gemini 3 Pro.

For teams building developer tooling, code review automation, or financial analysis pipelines, Gemini 3.1 Pro Preview is designed for the level of structured reasoning those applications require.

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
Google
Legal:Terms
Privacy
1M
6.1s
188tps
$2.00/M
$12.00/M
Read:
$0.2/M
Write:
$14.00/K
+ input costs
02/19/2026
Google Vertex
Legal:Terms
Privacy
1M
3.1s
186tps
$2.00/M
$12.00/M
Read:
$0.2/M
Write:
$14.00/K
+ input costs
02/19/2026
Throughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Latency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

Uptime

Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.

More models by Google

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
Providers
ZDR
No Training
Release Date
1M
0.9s
250tps
$0.25/M$1.50/M
Read:$0.03/M
Write:
$14.00/K
+ input costs
google logo
vertex logo
03/03/2026
1M
0.6s
194tps
$0.50/M
$3.00/M
Read:
$0.05/M
Write:
$14.00/K
+ input costs
google logo
vertex logo
12/17/2025
1M
0.4s
225tps
$0.10/M$0.40/M
Read:$0.01/M
Write:
$35.00/K
+ input costs
google logo
vertex logo
06/17/2025
1M
0.4s
196tps
$0.30/M$2.50/M
Read:$0.03/M
Write:
$35.00/K
+ input costs
google logo
vertex logo
03/20/2025
1M
1.8s
126tps
$1.25/M
$10.00/M
Read:
$0.13/M
Write:
$35.00/K
+ input costs
google logo
vertex logo
03/20/2025
1M
0.4s
144tps
$0.15/M$0.60/M
Read:$0.03/M
Write:
$35.00/K
+ input costs
google logo
vertex logo
12/11/2024

What To Consider When Choosing a Provider

  • Configuration: This model supports the medium thinking level via thinking_level in providerOptions.google, giving you control over the cost, performance, and speed tradeoff.
  • Zero Data Retention: AI Gateway supports Zero Data Retention for this model via direct gateway requests (BYOK is not included). To configure this, check the documentation.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

When to Use Gemini 3.1 Pro Preview

Best For

  • Automated code review: Security vulnerability analysis and test suite generation
  • Agentic software engineering: Tasks requiring planning across multiple code changes
  • Financial and spreadsheet analysis: Modeling, formula generation, and structured numerical work
  • Pro-tier reasoning tasks: The efficient thinking improvement reduces per-task token cost
  • Long agentic sessions: Accumulated token consumption from reasoning steps is a cost concern

Consider Alternatives When

  • Initial Gemini 3 Pro baseline: You need capabilities without the 3.1 updates (consider google/gemini-3-pro-preview)
  • Speed and cost at volume: Your primary need is efficiency at high throughput (consider google/gemini-3-flash or google/gemini-3.1-flash-lite-preview)
  • Image generation alongside reasoning: Your task requires native image output (consider google/gemini-3-pro-image)
  • Flash-tier reasoning is enough: Pro-tier capability is not required (consider google/gemini-3-flash)

Conclusion

Gemini 3.1 Pro Preview addresses the most common reasons teams hit limits with Gemini 3 Pro: token-heavy reasoning sessions in agentic workflows, and the need for more reliable performance in finance and structured data applications. The efficiency improvements in thinking make extended pro-tier reasoning more economically viable for sustained production deployments.

Frequently Asked Questions

  • What improvements does Gemini 3.1 Pro Preview have over Gemini 3 Pro?

    Three areas: quality improvements for software engineering and agentic workflows, enhanced usability for finance and spreadsheet applications, and more efficient thinking that reduces token consumption while maintaining performance.

  • Does more efficient thinking mean lower quality outputs?

    No. Performance stays the same while token consumption decreases. The model uses fewer tokens to reason through a problem without degrading output quality, which reduces cost per task.

  • What thinking level does this model support?

    medium thinking level, configured via thinking_level in providerOptions.google. This provides finer control over the cost, performance, and speed tradeoff.

  • Is this model suitable for automated code review?

    Yes. Software engineering quality improvements are a primary focus of the 3.1 update, making it well suited for code review, security analysis, and test generation.

  • How do I set the thinking level in the AI SDK?

    Under providerOptions.google in your streamText or generateText call, set thinking_level to low, medium, or high.

  • Does Gemini 3.1 Pro Preview require its own Google API account?

    No. AI Gateway manages all provider credentials. You connect using a Vercel API key or OIDC token.

  • What makes this model well-suited for finance and spreadsheet tasks?

    Gemini 3.1 Pro specifically improves on finance and spreadsheet usability. These tasks involve structured numerical analysis, formula generation, and multi-step calculation that benefit from pro-tier reasoning.

  • When should I use Gemini 3.1 Pro versus Gemini 3.1 Flash for engineering tasks?

    For complex multi-step engineering tasks where correctness of the reasoning chain matters, security audits, architectural planning, test generation, the Pro tier provides more thorough reasoning. For high-volume, more repetitive engineering tasks like code completion or linting at scale, Flash-tier models offer a better cost-to-quality ratio.