Gemini 3.1 Pro Preview API
LLMThe Gemini 3.1 Pro Preview API is the featured Gemini preview with 1M context, vision, and tool use.
- Input · <=200K$0.8 USDOfficial price
$2 USD - Output · <=200K$4.8 USDOfficial price
$12 USD - Input · 200K-1M$1.6 USDOfficial price
$4 USD - Output · 200K-1M$7.2 USDOfficial price
$18 USD - Savings60%
- Context1M
- ReleasedFeb 19, 2026
- Prices checkedNov 30, 2026
- View tool pricing and billing rules
What are we making today?
Bring an idea, a question, or a first draft.
01
What this model is for
The Gemini 3.1 Pro Preview API is the featured Gemini preview with 1M context, vision, and tool use.
Gemini 3.1 Pro Preview is Google's preview entry in the Gemini Pro line, offered on OmniaKey with a 1M-token context window, image input and tool use. Its model id keeps the preview marker, so it reads as a trial version of the Pro tier rather than the settled one. The listing names Cursor, Cline and Aider for client setup. Two other Pro models sit beside it in the catalog: Gemini 4 Argon, the newer arrival, and Gemini 2.5 Pro, the released 2.5-generation option.
The reason to pick it is comparison, not production breadth. The catalog splits its rate by prompt length: one tier up to 200,000 input tokens, a higher tier from there to 1M, with cached input priced in each. That threshold rewards trimming and retrieval, because a document that crosses it moves to the other tier for the whole request. Gemini 4 Argon lists a flat rate and a lower output rate, and Gemini 2.5 Pro lists lower rates in both tiers, so keep this id where a migration replay or a pinned client genuinely needs the 3.1 behaviour.
Best-fit coding workloads
Long specification review
Send a 300-page specification in one request and ask which clauses contradict each other. The 1M window holds the file, and the second price tier starts at 200,000 input tokens, so record prompt size per call. Practical tip: put the stable instructions first and the changing document last.
Pinned preview replay
Keep an evaluation set on gemini-3.1-pro-preview while you test a move to Gemini 4 Argon, with the same prompts, tools and scoring script for both ids. Practical tip: keep the model string in configuration so a fallback does not need a code release.
Editor prototyping
Build a read-only repository or document assistant in Cursor, Cline or Aider, the clients the catalog names. Image input covers screenshots, diagrams and rendered pages in the same thread. Practical tip: bound the turn count and print every tool argument before the agent is allowed to change files.
02
Technical specification
Catalog facts and integration details verified for this route.
- Model ID
- gemini-3.1-pro-preview
- Context
- 1M
- Inputs and tools
- Vision · Tool use
- API endpoint
- /v1/chat/completions
- Cache hit / 1M
- $0.08 USD
- Coding clients
- Cursor · Cline · Aider
Limits to plan around
- The id is a preview, and a preview can be revised or withdrawn. Pin it only next to a stored fallback plus a replay set that shows the fallback answers your tasks the same way.
- The 200,000-token threshold changes the rate mid-document, so retrieval, trimming and chunking decisions affect the bill and not only answer quality. Measure prompt size before choosing a strategy.
- The catalog lists vision, tool use and three coding clients for this id, and lists no batch mode, fine-tuning or explicit reasoning-level setting. Plan around what is listed rather than assuming the 3.8 controls apply here.
03
Compare nearby models
Compare workload fit and current listed token rates before choosing a route.
| Model | Best for | Context | Input | Output |
|---|---|---|---|---|
| Gemini 3.1 Pro PreviewThis page gemini-3.1-pro-preview | Reproducing 3.1 preview behaviour, or serving a client already pinned to this preview id. | 1M | $0.8 USD Official price $2 USD | $4.8 USD Official price $12 USD |
| Gemini 4 Argon gemini-4-argon | The better default for new Pro-tier work, with a flat rate and video and audio input. | 1M | $1.6 USD Official price $4 USD | $8 USD Official price $20 USD |
| Gemini 2.5 Pro gemini-2.5-pro | A released Pro model with lower rates in both prompt-length tiers when the preview is not required. | 1M | $0.5 USD Official price $1.25 USD | $4 USD Official price $10 USD |
04
SDK quickstarts
Use one base URL and model ID from cURL, Python, or TypeScript.
curl https://api.omniakey.com/v1/chat/completions \
-H "Authorization: Bearer $OMNIAKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-pro-preview",
"messages": [
{"role": "user", "content": "Review this pull request"}
],
"stream": true
}'05
Estimate token cost
Enter expected input and output tokens to compare current listed rates.
- OmniaKey estimate
- $0.176
- Official-rate estimate
- $0.44
- Estimated savings
- $0.264
Estimate covers input and output tokens only. Cache usage, retries, tools, and client-side token accounting can change the final charge.
06
Related coding guides
Deeper selection, setup, and troubleshooting guidance for this model family.
Gemini 4 Argon review: a powerful launch, not a public API yet
Argon looks like a serious frontier upgrade, but the sensible launch-day decision is to evaluate the evidence and wait for a callable contract before migrating production traffic.
Read guideGemini 3.8 Flash API Pricing and Agent Cost
Google's introductory rate is $0.75 input and $3.75 output per million tokens, but retries and thinking decide the cost of an accepted result.
Read guide07
Sources and verification
Model facts and links were checked on 2026-10-27. Provider documentation remains the authority for upstream behavior.
Cache and batch prices
What OmniaKey bills per 1M tokens of cached input on Gemini 3.1 Pro Preview.
- Cache read · <=200K
- $0.08 USD
- Cache read · 200K-1M
- $0.16 USD
- Batch API
- Not available on OmniaKey.Google's own Batch API bills 50% of standard prices.
Google caches repeated prompt prefixes automatically, and cached input is billed at the cache-read price.
Common errors
The errors OmniaKey users hit most often, from our production logs. Each message appears as the API returns it.
HTTP 403
Insufficient quota- Cause
- Your OmniaKey balance has run out.
- Fix
- Top up your balance. The same API key works again right away.
HTTP 403
insufficient quota for pre-charge- Cause
- Before a request runs, OmniaKey reserves its largest possible cost, which grows with the prompt and max_tokens. Your balance is below that amount.
- Fix
- Top up, or lower max_tokens.
HTTP 401
Invalid token- Cause
- The request carries no API key, or a key that does not exist.
- Fix
- Copy the key from your dashboard again and check that your client sends it.
HTTP 503
No available channel for model <model> under group <group>- Cause
- The model name does not match one OmniaKey serves, often because of a dot or a capital letter, such as claude-sonnet-5.5 for claude-sonnet-5-5. It also appears when every supplier of the model is unavailable.
- Fix
- Use the exact model ID, gemini-3.1-pro-preview. If it already matches, retry later or switch models.
HTTP 524
524: A timeout occurred- Cause
- No data came back for about 100 seconds, so Cloudflare closed the connection. Long answers without streaming run into this.
- Fix
- Set stream to true, so tokens arrive while the answer is written.
Frequently asked questions
How much does Gemini 3.1 Pro Preview cost on OmniaKey?
Rates vary with input context length: <=200K: Input $0.8 USD, Output $4.8 USD, Cache hit / 1M $0.08 USD; 200K-1M: Input $1.6 USD, Output $7.2 USD, Cache hit / 1M $0.16 USD.
What is the context window for Gemini 3.1 Pro Preview?
The listed context window is 1M. Actual usable limits can also depend on the client and upstream request format.
How do I call Gemini 3.1 Pro Preview through OmniaKey?
Send a POST request to https://api.omniakey.com/v1/chat/completions with the model field set to gemini-3.1-pro-preview. One OmniaKey key covers every listed model, and ids are case-sensitive, so copy the string from the model page instead of retyping it. Image parts and tool definitions go in the same OpenAI-compatible body.
Why is the same prompt billed differently above 200,000 tokens?
The catalog gives this id two price tiers by input length: up to 200,000 tokens, then 200,000 to 1M. A request in the second tier uses the higher input, output and cached-input rates for that whole call. Measure prompt size before you choose a chunk size, and read the price table on the model page for current rates.
Is Gemini 3.1 Pro Preview the same model as Gemini 4 Argon?
No. Gemini 4 Argon is the newer Pro-tier entry, with one flat rate, text, image, video, audio and PDF input, and a medium default thinking level. This id is a preview of the earlier Pro generation, priced in two prompt-length tiers. Keep the preview for replaying an existing setup and use Argon for new work.
Does Gemini 3.1 Pro Preview accept images and tool calls?
The catalog lists vision and tool use, so image content and function definitions can travel in the same request. Cursor, Cline and Aider are the clients it names. Confirm that your client shapes image parts the way the OpenAI-compatible body expects, and print the tool arguments your agent produces before it is allowed to write.
Should a new project start on this preview model?
Start new Pro-tier work on Gemini 4 Argon, or on a Flash model if the bill leads, and keep this id as a comparison point. Preview models can be revised or retired, and any client pinned to one needs a stored fallback. Holding the model string in configuration makes that switch a settings change.