Google

Gemini 3.1 Pro Preview

google/gemini-3.1-pro-preview
/v1/chat/completions/v1/messages/v1/responses/v1beta/models/*/v1/models/*

Gemini 3.1 Pro Preview 专为高级开发和智能体系统而设计,在提升令牌效率的同时,增强了长期稳定性、工具编排能力。它引入了一种新的中间思维模式,以更好地平衡成本、速度和性能。该模型在智能体编码、结构化规划、多模态分析和工作流自动化方面表现出色,因此非常适合自主智能体、金融建模、电子表格自动化和高上下文企业任务。

Input / output modalities
Not provided to Not provided
Reference input / output price
Input¥14Output¥84per 1M tokens
Context window
1M
Added to catalog
Feb 21, 2026

Providers and pricing

ProviderInput lengthInput /MOutput /MCached /MContextMax outputDetails
Google Vertex≤ 200K¥14¥84¥1.41M65.5K
≥ 200K¥28¥126¥2.8
OpenRouter≤ 200K¥14¥84¥1.41M65.5K
≥ 200K¥28¥126¥2.8

Google Vertex

Latency
5.69s
Throughput
461 tokens/s
Context
1M

Pricing

Input
¥14/M tokens
Output
¥84/M tokens
Cached
¥1.4/M tokens

Tiered pricing

Pricing varies by input token range.

0–200K Token

Input tier
¥14/M tokens
Output tier
¥84/M tokens
Cached tier
¥1.4/M tokens

200K–∞ Token

Input tier
¥28/M tokens
Output tier
¥126/M tokens
Cached tier
¥2.8/M tokens

Specifications

Context
1M
Max output
65.5K
Supported APIs
/v1/chat/completions/v1/messages/v1/responses/v1beta/models/*/v1/models/*

OpenRouter

Latency
12.1s
Throughput
116 tokens/s
Context
1M

Pricing

Input
¥14/M tokens
Output
¥84/M tokens
Cached
¥1.4/M tokens

Tiered pricing

Pricing varies by input token range.

0–200K Token

Input tier
¥14/M tokens
Output tier
¥84/M tokens
Cached tier
¥1.4/M tokens

200K–∞ Token

Input tier
¥28/M tokens
Output tier
¥126/M tokens
Cached tier
¥2.8/M tokens

Specifications

Context
1M
Max output
65.5K
Supported APIs
/v1/chat/completions/v1/messages/v1/responses/v1beta/models/*/v1/models/*

Gemini 3.1 Pro Preview code examples and API guide

Modelmesh normalizes requests and responses across service providers behind one consistent API.

Modelmesh provides an OpenAI-compatible Completion API for more than 300 models and service providers. Call it directly, through the OpenAI SDK, or with supported third-party SDKs.

Modelmesh-specific request headers in these examples are optional. When supplied, your application can appear on the Modelmesh rankings.

Supported endpointsSelect an endpoint to switch the example below.
/v1/chat/completions
from openai import OpenAI API_KEY = "$SSY_API_KEY" client = OpenAI( base_url="https://router.shengsuanyun.com/api/v1", api_key=API_KEY, ) try: completion = client.chat.completions.create( model="google/gemini-3.1-pro-preview", messages=[{"role": "user", "content": "Which number is larger, 9.11 or 9.8?"}], temperature=0.6, top_p=0.7, stream=True, ) response_text = "" for chunk in completion: if chunk.choices and chunk.choices[0].delta.content is not None: content = chunk.choices[0].delta.content print(content, end="", flush=True) response_text += content except Exception as error: print(f"Request failed: {error}")
                
              

Related Models