Build next-gen apps with gemini-3.1-pro-preview
Pricing
Input tokens <= 200K · Input token range · <=200k
Per 1M Tokens- Official Price
- Input $2.00 / Output $12.00 / Cache Read $0.20
- TokenLab Price
- Input $1.00 / Output $6.00 / Cache Read $0.10
- Discount
- 50%
Input tokens > 200K · Input token range · >200k
Per 1M Tokens- Official Price
- Input $4.00 / Output $18.00 / Cache Read $0.40
- TokenLab Price
- Input $2.00 / Output $9.00 / Cache Read $0.20
- Discount
- 50%
| Official PricePer 1M Tokens | TokenLab PricePer 1M Tokens | Discount | |
|---|---|---|---|
| Input tokens <= 200K · Input token range · <=200k | Input $2.00 / Output $12.00 / Cache Read $0.20 | Input $1.00 / Output $6.00 / Cache Read $0.10 | 50% |
| Input tokens > 200K · Input token range · >200k | Input $4.00 / Output $18.00 / Cache Read $0.40 | Input $2.00 / Output $9.00 / Cache Read $0.20 | 50% |
| Cache Read | $0.20 | $0.10 | 50% |
One-click test
Sign in once and Web Agent keeps this model, prompt, and request preset for you.
Test gemini-3.1-pro-preview in Web Agent with a short request at /v1beta/models/gemini-3.1-pro-preview:generateContent, then show request body, latency, and response.
API workbench
The default route for production. The code sample below uses this endpoint with the format you pick.
curl "https://api.tokenlab.sh/v1beta/models/gemini-3.1-pro-preview:generateContent" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: sk-xxx" \
-d '{
"contents": [
{"role": "user", "parts": [{"text": "Hello!"}]}
]
}'Use cases
Best forVision
Reading images, parsing documents, and answering visual questions
Agents and tools
Drive reasoning, support triage, tool calls, and multi-step task flows.
Developer workflows
Generate, review, or debug code without rewiring your stack.
Knowledge assistants
Ship chat, search, and retrieval with predictable cost and behavior.
Side-by-side test
Compare real response quality, latency, and price for production defaults.
Prompt examples
Write a concise support reply and list the assumptions behind it.
Review this API design and call out the top three integration risks.
Turn a long changelog into release notes a non-engineer would read.
Cost Calculator
FAQ
How much does gemini-3.1-pro-preview cost?
On TokenLab, gemini-3.1-pro-preview costs Input $1.00 / Output $6.00 Per 1M Tokens. The pricing table above shows the full breakdown.
What is gemini-3.1-pro-preview best for?
gemini-3.1-pro-preview is a strong fit for Vision, Tool Use, JSON Mode. You can call it through TokenLab with one API key.
How do I call the gemini-3.1-pro-preview API?
Get a TokenLab API key, then send your request to https://api.tokenlab.sh/v1beta/models/gemini-3.1-pro-preview:generateContent. The API workbench above has a recommended endpoint and copy-ready code.
Which endpoint should gemini-3.1-pro-preview use?
Use https://api.tokenlab.sh/v1beta/models/gemini-3.1-pro-preview:generateContent as the default for gemini-3.1-pro-preview. If a provider-native format is supported, the API workbench shows that endpoint too.
Can I test gemini-3.1-pro-preview before integrating it?
Yes. Try in Web Agent opens a ready test for gemini-3.1-pro-preview and keeps your prompt after sign-in, so you don’t lose context.