Gemini 3.1 Pro
厂商牌价,无平台加价,按量付费。 以下为官方 list 价。登录客户可在 /console/pricing 查看含工作空间折扣的实际价格。 按 70% 缓存命中率计算的等效输入价:$0.74/M. 当前 Gemini 模型默认开启隐式缓存(缓存命中自动打折),另有按存储计费的显式 CachedContent API,可获得确定性的节省。
30 秒用上 Gemini 3.1 Pro
OpenAI 兼容:换掉 base_url,SDK 不用改。POST /v1/chat/completions
from openai import OpenAI
client = OpenAI(
base_url="https://synthorai.io/v1",
api_key="sk-syn-...",
)
resp = client.chat.completions.create(
model="gemini-3.1-pro-preview",
messages=[{"role": "user", "content": "Summarize this diff"}],
reasoning_effort="medium",
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://synthorai.io/v1",
apiKey: "sk-syn-...",
});
const resp = await client.chat.completions.create({
model: "gemini-3.1-pro-preview",
messages: [{ role: "user", content: "Summarize this diff" }],
reasoning_effort: "medium",
});
console.log(resp.choices[0].message.content);curl https://synthorai.io/v1/chat/completions \
-H "Authorization: Bearer sk-syn-..." \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-pro-preview",
"messages": [{"role": "user", "content": "Hello"}],
"reasoning_effort": "medium"
}'package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
)
func main() {
client := openai.NewClient(
option.WithBaseURL("https://synthorai.io/v1"),
option.WithAPIKey("sk-syn-..."),
)
resp, _ := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{
Model: "gemini-3.1-pro-preview",
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Summarize this diff"),
},
ReasoningEffort: openai.ReasoningEffortMedium,
})
fmt.Println(resp.Choices[0].Message.Content)
}import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.*;
import com.openai.models.ReasoningEffort;
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl("https://synthorai.io/v1")
.apiKey("sk-syn-...")
.build();
ChatCompletion resp = client.chat().completions().create(
ChatCompletionCreateParams.builder()
.model("gemini-3.1-pro-preview")
.addUserMessage("Summarize this diff")
.reasoningEffort(ReasoningEffort.MEDIUM)
.build());
System.out.println(resp.choices().get(0).message().content().orElse(""));关于 Gemini 3.1 Pro
Gemini 3.1 Pro(preview)是 Google 对 Gemini 3 Pro 产品线的精进迭代,其模型页强调更好的思考、更高的 token 效率和更扎实、事实更一致的体验,并特别针对需要精确工具使用的软件工程与智能体工作流优化。
- 它在 1,048,576 token 上下文窗口内接受文本、图像、视频、音频和 PDF 输入,输出 65,536 token,支持函数调用、结构化输出、代码执行、接地和缓存;还有一个 custom-tools 变体优先使用开发者自定义工具。
- Synthorai 以 OpenAI 兼容 chat completions API 作为它的前端。
规格与限制
| 最大输出(厂商规格) | 65,536 |
| 模态 | text + image + video + audio → text |
| 特性 | tools · structured_output · streaming · vision · batch · caching · reasoning |
| 备注 | 1,048,576-token input; Search/Maps grounding and code execution supported; image generation NOT supported despite gateway capability tag. |
| 提示词缓存 | 自动 + 显式 · 最小前缀 1,024 token |
常见问题
Gemini 3.1 Pro API 可以免费试用吗?
可以。新账号可获得 10 次试用调用和最高 $1 的免费额度,无需绑卡。按输入 $2/M 计算,仅这笔额度就足够对 Gemini 3.1 Pro 发起约 62 次 ~8K token 的请求。
Gemini 3.1 Pro 最擅长什么?
更好的思考与更高 token 效率,以及针对软件工程与智能体优化和custom-tools 变体优先自定义工具。完整能力请见 About 部分,内容取自厂商官方发布说明。
Gemini 3.1 Pro 的价格是多少?
在 Synthorai 上,Gemini 3.1 Pro 输入 $2/百万 token、输出 $12/百万 token,即厂商牌价,无平台加价。缓存命中的输入 token 按 $0.2/M 计费。
Gemini 3.1 Pro 支持提示词缓存(prompt caching)吗?
支持:自动缓存默认开启,另有显式模式可获得确定性折扣。缓存命中的输入 token 按 $0.2/M 计费(未命中 $2/M);提示词需有 1,024 token 以上的稳定前缀才能命中缓存。 提示词缓存指南 →
如何开通 Gemini 3.1 Pro?
把现有 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 设为 "gemini-3.1-pro-preview" 即可。一把 API key 通用网关上的全部模型。
Gemini 3.1 Pro 的知识截止日期是什么时候?
Gemini 3.1 Pro 的知识截止日期为 2025-01,依据厂商官方文档(数据核验于 2026-07-09)。