Speed
Output tokens / second
Custom pricing for production workloads
A frontier reasoning model optimized for software engineering and agentic workflows with 1M token context.
Built for complex tasks, creative breakthroughs, and intelligent agents that plan and act across long horizons.
google/gemini-3.1-pro-previewhttps://api.aimlapi.com/v1Gemini 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.
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.
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.
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.
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.
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.
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.
See how Gemini 3.1 Pro compares in generation speed and latency. Data retrieved Nov 3, 2026.
Output tokens / second
Compare 6 models available on AI/ML API across 5 independent benchmarks.
Expert-written questions across academic subjects.
Graduate-level science questions written to resist web search.
Agentic tasks completed in a command-line environment.
Reasoning across long documents of about 100k tokens.
Python coding tasks drawn from scientific research.
| Usage | Price | Unit |
|---|---|---|
| Input | $2 | 1M tokens |
| Output | $12 | 1M tokens |
| Cached input | $0.5 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $2 | $12 | |
| $0.3 | $2.5 | |
| $0.75 | $3.75 | |
| $0.75 | $3.75 | |
| $2 | $10 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"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."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "google/gemini-3.1-pro-preview",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "google/gemini-3.1-pro-preview",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Gemini 3.1 Pro has a 1,000,000 tokens context window and can return up to 65,536 tokens.
Gemini 3.1 Pro takes image, text as input and returns text.
Use google/gemini-3.1-pro-preview as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
Gemini 3.1 Pro became available on February 25, 2026.
Gemini 3.1 Pro costs $2 input and $12 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Yes, Gemini 3.1 Pro can stream responses as they are generated.
Yes, Gemini 3.1 Pro accepts image input alongside text.
Gemini 3.1 Pro was built by Google.
It is described as a reasoning model optimized for software engineering and agentic workflows.
Yes, it supports function calling, tool use, and parallel tool calls, along with structured output.