Gemini 3.1 Pro API

A frontier reasoning model optimized for software engineering and agentic workflows with 1M token context.

Modalities
TextText
In / Out price
$2/$12per 1M
Context window
1M tokens
Released
Feb 25, 2026

Gemini 3.1 Pro overview

Gemini 3.1 Pro by Google

Built for complex tasks, creative breakthroughs, and intelligent agents that plan and act across long horizons.

Gemini 3.1 Pro specs

Model ID
google/gemini-3.1-pro-preview
Developer
Google
Context window
1,000,000 tokens
Max output
65,536 tokens
Input
Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

Gemini 3.1 Pro API, Advanced AI for Complex Tasks

Gemini 3.1 Pro represents the newest flagship model from Google DeepMind, purpose-built for advanced reasoning, cross-domain synthesis, and high-level creative execution. It operates seamlessly across text, visual media, audio, video, and code, expanding upon the foundation of Gemini 3 Pro with stronger intelligence and more refined real-world comprehension.

Next-Level Reasoning

Built for problems where simple answers fall short, 3.1 Pro applies advanced reasoning to interpret, synthesize, and deliver insights on intricate tasks from strategic data analysis to creative engineering workflows.

True Multimodal Intelligence

Gemini 3.1 Pro natively understands and processes text, imagery, audio, video, and code together. This lets it build richer outputs that combine these modalities seamlessly.

Scale and Context

With the ability to handle large, multimodal inputs, 3.1 Pro excels at projects requiring deep context, such as system design, data synthesis, and long-form analysis.

What Gemini 3.1 Pro Can Do

From scientific reasoning to agentic coding and immersive 3D simulation, Gemini 3.1 Pro covers the full breadth of modern AI tasks with greater precision than any previous model in the Gemini family.

State-of-the-Art Reasoning

Gemini 3.1 Pro delivers smart, concise, and insightful answers on difficult academic and professional problems. Its reasoning prioritizes genuine intellectual depth over generic responses, scoring 44.4% on Humanity's Last Exam, the highest of any evaluated model without tool assistance.

Use cases

Gemini 3.1 Pro Preview is documented as suited to software engineering work and agentic workflows that need precise tool use and reliable multi-step execution. It is also suited to building with custom tools and bash, where it can prioritize those tools effectively. Another documented use case is creating code-based animated SVGs and other creative coding outputs directly from text prompts. A further stated use case is building complex interactive experiences, such as a live aerospace dashboard or sensory-rich 3D simulations.

Capabilities

  • Function calling
  • Streaming
  • Structured outputs

Gemini 3.1 Pro benchmarks by Artificial Analysis

See how Gemini 3.1 Pro compares in generation speed and latency. Data retrieved Nov 3, 2026.

Speed

Output tokens / second

Benchmark results

Compare 6 models available on AI/ML API across 5 independent benchmarks.

Humanity's Last Exam

Expert-written questions across academic subjects.

Gemini 3.1 Pro API pricing

Gemini 3.1 Pro pricing in US dollars
UsagePriceUnit
Input$21M tokens
Output$121M tokens
Cached input$0.51M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

Gemini 3.1 Pro vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
Gemini 3.1 Pro$2$12
Gemini 3.5 Flash Lite$0.3$2.5
Gemini 3.8 Flash$0.75$3.75
Gemini 3.7 Flash$0.75$3.75
Gemini 4 Argon$2$10

How to use the Gemini 3.1 Pro API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "google/gemini-3.1-pro-preview",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

Gemini 3.1 Pro FAQ

What is the context window of Gemini 3.1 Pro?

Gemini 3.1 Pro has a 1,000,000 tokens context window and can return up to 65,536 tokens.

What inputs and outputs does Gemini 3.1 Pro support?

Gemini 3.1 Pro takes image, text as input and returns text.

What is the model ID for Gemini 3.1 Pro?

Use google/gemini-3.1-pro-preview as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

When was Gemini 3.1 Pro released?

Gemini 3.1 Pro became available on February 25, 2026.

How much does Gemini 3.1 Pro cost?

Gemini 3.1 Pro costs $2 input and $12 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does Gemini 3.1 Pro support streaming?

Yes, Gemini 3.1 Pro can stream responses as they are generated.

Can Gemini 3.1 Pro read images?

Yes, Gemini 3.1 Pro accepts image input alongside text.

Who created Gemini 3.1 Pro?

Gemini 3.1 Pro was built by Google.

What kind of coding tasks is Gemini 3.1 Pro built for?

It is described as a reasoning model optimized for software engineering and agentic workflows.

Does Gemini 3.1 Pro support calling external tools or functions?

Yes, it supports function calling, tool use, and parallel tool calls, along with structured output.

Start building with Gemini 3.1 Pro

Gemini 3.1 Pro API

google/gemini-3.1-pro-preview

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "google/gemini-3.1-pro-preview",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'