Gemini 3.1 Pro Preview API
Gemini 3.1 Pro preview for coding and agentic tasks
About this model
Gemini 3.1 Pro Preview refines Google’s Gemini 3 Pro series. Google describes it as offering better thinking, improved token efficiency and more grounded, factually consistent answers, optimized for software engineering and agentic workflows that need precise tool use.
Google lists a 1,048,576-token context window and a 65,536-token output limit. Image, audio and video are accepted as input. As a preview model it can change before a stable release.
Pick it over the Flash and Flash-Lite models when you need Gemini 3-generation depth; pick those siblings for speed and volume. In this catalog it accepts images and PDFs.
Use cases
- Software engineering and code review
- Agentic workflows with precise tool use
- Analysis of long documents and images
Input and output
- Input
- Text, images and PDF
- Output
- Text
Developer
- Developer
- Type
- Conversation
- Context
- 1,000,000 tokens
- Capabilities
- Image input
Gemini 3.1 Pro Preview request example
Use https://gatelum.com/v1 as the base URL and pass google/gemini-3.1-pro-preview in the model field. You create the key in your account after signing up.
curl --silent --show-error --fail-with-body \
--header 'Authorization: Bearer glt_YOUR_KEY' \
'https://gatelum.com/v1/chat/completions' \
--header "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "google/gemini-3.1-pro-preview",
"messages": [
{
"role": "user",
"content": "Hi! Tell me about yourself in two sentences."
}
]
}
JSONClaude Code and Anthropic-protocol clients
For clients using the Anthropic protocol, point the address at ANTHROPIC_BASE_URL=https://gatelum.com with no /v1. The model ID does not change.
export ANTHROPIC_BASE_URL=https://gatelum.com
export ANTHROPIC_AUTH_TOKEN=glt_YOUR_KEY
export ANTHROPIC_MODEL=google/gemini-3.1-pro-preview
claudeWhere to use Gemini 3.1 Pro Preview
Guides with step-by-step instructions for the tools that support this model: