- Text
- 1.05M context
Gemini 3.1 Pro Preview API: pricing, capabilities and setup
Gemini 3.1 Pro Preview API: Google's Pro-tier model with Preview status for deep reasoning, code and multi-step tasks, with a 1M-token context window.
pay as you go · no subscription · key right after sign-up
How much Gemini 3.1 Pro Preview costs
- Input$0.30per 1M tokens
- Output$1.70per 1M tokens
- Cache read$0.03per 1M tokens
- Cache write$0.30per 1M tokens · same as input
Cost calculator
30 M tokens
75%
The rest is output
- With llmbox
- $20
What a typical task costs
| Task | Tokens (input / output) | With llmbox |
|---|---|---|
| Short chat | 2 000 / 500 | $0.00145 |
| Code review | 20 000 / 2 000 | $0.0094 |
| Document summary | 40 000 / 2 000 | $0.0154 |
| Agent session | 600 000 / 30 000 | $0.231 |
Specs
- Context1.05Mtokens
- Max output66Ktokens
- Inputtext
Setup in three steps
- 01Get a key
Sign up and create an API key in the dashboard.
Get a key → - 02Set the base URL
In any OpenAI-compatible client, point the API address to:
- 03Pass the model id
Put this identifier in the model field:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://llmbox.cc/v1",
api_key=os.environ["LLMBOX_API_KEY"],
)
resp = client.chat.completions.create(
model="google/gemini-3.1-pro-preview",
messages=[{"role": "user", "content": "Hi! Tell me about yourself in two sentences."}],
)
print(resp.choices[0].message.content)What Gemini 3.1 Pro Preview is good for
Gemini 3.1 Pro Preview is a Pro-tier model in Google's Gemini 3 generation. Google publishes it in the Gemini API with Preview status, under the same name it has in the llmbox catalog. Per Google, the model refines the Gemini 3 Pro series: it reasons better, uses tokens more efficiently and gives more grounded, factually consistent answers, and it is tuned for software engineering and multi-step tasks. According to Google's documentation, it has a 1,048,576-token context window and a single response returns up to 65,536 tokens. On llmbox the model works with text: text in, text out.
What it's good for
The key difference from the Flash models is the default reasoning depth: per Google's documentation, the model reasons at a high level out of the box, while Gemini 3.8 Flash defaults to medium. That suits questions where the answer takes several steps to work out: finding the cause of a bug, comparing architecture options, checking the wording of a contract or a technical spec.
The 1M-token window lets you pass the material in full — a report, product documentation, an exported conversation — and get an answer grounded in the whole text, without splitting it into chunks.
The catalog also has Gemini 3.1 Pro, a model from the same line. If your project already runs on Preview, keep it there and send the same requests to 3.1 Pro: tokens and cost for both are in the request log, you compare the answers on your side, and switching between them only changes the model ID, with the same key.
When it's not the right fit
- The model has to work inside an agent — with your functions, JSON-schema output, image input or Codex CLI. Through llmbox those are available on Gemini 4 Argon and Gemini 3.8 Flash.
- Many uniform requests where speed matters — a high reasoning level is overkill there; Gemini 3.1 Flash Lite fits better.
- You need image generation — use Gemini 3 Pro Image.
How to connect
You call 3.1 Pro Preview from your own code — an analytics service, a document review bot, a code review script — through the OpenAI SDK or another OpenAI-compatible client. All you need is an llmbox key: no AI Studio key or Google Cloud project, and the key and base URL are covered in the Quickstart.
Gemini 3.1 Pro Preview API pricing
The rates per 1M input, output and cache-read tokens are on this page. Reasoning tokens count as output, and the high default reasoning level increases their number even on short questions — check the cost of your own requests in the request log. You pay from a prepaid balance as you go, with no subscription.
Typical tasks
- Analytical questions that take several reasoning steps
- Finding the cause of a bug and comparing solutions in code
- Answers over whole long documents
- Services that already run on 3.1 Pro Preview
Gemini 3.1 Pro Preview or Gemini 3.1 Pro?
| Model | Input · 1M | Output · 1M |
|---|---|---|
| Gemini 3.1 Pro Preview | $0.30 | $1.70 |
| Gemini 3.1 Pro | $0.60 | $2.45 |
Gemini 3.1 Pro Preview vs neighbours
| Model | Input · 1M | Output · 1M |
|---|---|---|
| Gemini 3.1 Pro Preview | $0.30 | $1.70 |
| Gemini 3.8 Flash | $0.225 | $1.125 |
| Gemini 3.6 Flash | $0.25 | $1.215 |
| Gemini 4 Hydrogen | $0.344 | $1.72 |
| Gemini 4 Argon | $0.459 | $2.295 |
| Qwen3.8 Max Qwen | $0.225 | $0.7875 |
Other Google models
FAQ
How is Gemini 3.1 Pro Preview different from Gemini 3.1 Pro in the catalog?
Both belong to the Gemini 3.1 Pro line, with the same context window and response limit. The Preview name repeats the model name in the Gemini API, where Google publishes it with Preview status. Compare rates on the model pages, and tokens and cost of your own requests in the request log.
How is 3.1 Pro Preview different from the Flash models?
Per Google's documentation, the model reasons at a high level by default, while Gemini 3.8 Flash defaults to medium. Pro is built for hard questions where depth matters; Flash is built for speed and cost at high request volumes.
Can I use it in an agent with my own functions?
Through llmbox, function calling, JSON-schema output and image input are available on Gemini 4 Argon and Gemini 3.8 Flash. 3.1 Pro Preview fits cases where the model needs to answer a hard question in text.
How do I connect Gemini 3.1 Pro Preview through llmbox?
Create a key in your dashboard and pass it, together with the llmbox base URL, to any OpenAI-compatible client, with google/gemini-3.1-pro-preview as the model. Step-by-step setup is in the Quickstart.
How is Gemini 3.1 Pro Preview billed?
Per input, output and cache-read token at the per-1M-token rates on this page, from a prepaid balance as you go. Reasoning tokens count as output, and the high default reasoning level increases their number.