Gemini 3.1 Pro Preview
Run Gemini 3.1 Pro Preview by Google on Inference.net through a serverless, OpenAI-compatible API at $2.00 per 1M input tokens and $12.00 per 1M output tokens. Built on a Proprietary architecture with a 1M-token context window with vision, tool calling, and structured outputs support, it streams low-latency responses with Zero Data Retention enabled by default.
- Developed by
- Model family
- Gemini 3.1 Pro Preview
- Size
- Not disclosed
- Architecture
- Proprietary
- Context window
- 1M tokens
- Max output
- 66K tokens
- License
- Commercial / Provider
Gemini 3.1 Pro Preview is a multimodal model from Google built on a Proprietary architecture, available through the Inference.net serverless API. Use the same OpenAI-compatible request shape across the catalog and switch models by changing a single identifier.
The API supports streaming responses and project-scoped credentials. Usage, token volume, and spend appear in the dashboard automatically, so the model can move from evaluation to production without a second integration path.
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://api.inference.net/v1',
apiKey: process.env.INFERENCE_API_KEY,
})
const completion = await client.chat.completions.create({
model: 'gemini-3.1-pro-preview',
messages: [{ role: 'user', content: 'Hello' }],
})import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.inference.net/v1",
api_key=os.environ["INFERENCE_API_KEY"],
)
completion = client.chat.completions.create(
model="gemini-3.1-pro-preview",
messages=[{"role": "user", "content": "Hello"}],
)curl https://api.inference.net/v1/chat/completions \
-H "Authorization: Bearer $INFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-pro-preview",
"messages": [
{ "role": "user", "content": "Hello" }
]
}'PRICING & TOKEN RATES
USD per 1M tokens| Token type | Rate (per 1M) | Details |
|---|---|---|
| Input | $2.00 | Standard prompt tokens |
| Cache read | $0.20 | 90% savings vs. standard input |
| Output | $12.00 | Generated completion tokens |
| Reasoning | $12.00 | Reasoning / thinking output tokens |
| Long-context input | $4.00 | Prompts over 200K input tokens |
| Long-context cache read | $0.40 | Cached reads over 200K input tokens |
| Long-context output | $18.00 | Completions over 200K input tokens |
SPECIFICATIONS & CAPABILITIES
gemini-3.1-pro-preview| Specification | Value |
|---|---|
| Maker | |
| Architecture | Proprietary |
| Parameters | Not disclosed |
| Quantization | Native / Unspecified |
| Context window | 1M tokens (1,048,576) |
| Max output | 66K tokens (65,536) |
| Input modalities | Text, Image |
| Output modalities | Text |
| Tool calling | Supported |
| Structured outputs | Supported |
| JSON object mode | Supported |
| Logprobs | Not specified |
| Reasoning efforts | Not supported |
| Supported wire endpoints | /v1/chat/completions/v1/responses/v1/messages |
| Data residency | Global (api.inference.net) |
| License | Commercial / Provider |
| Artificial Analysis Intelligence Index | 46 (captured Jul 31, 2026) |
| Release date | Feb 19, 2026 |
- Keep the stable system content block byte-identical across calls.
- Mark it with cache_control: { "type": "ephemeral" } to set a cache point.
- Long prompts are required. As a practical target, use roughly 4,000 stable tokens for Gemini 3.1 Pro Preview or 9,000 for the other listed Gemini models; these are not guaranteed provider minimums.
- Check usage.prompt_tokens_details.cached_tokens in the response to confirm cache reads.
{
"messages": [{
"role": "system",
"content": [{
"type": "text",
"text": "Stable system content...",
"cache_control": { "type": "ephemeral" }
}]
}]
}Estimate monthly savings for your prefix length and hit rate in the Prompt Cache Savings Calculator.
Claude Code
Native Anthropic /v1/messages. Six model slots for every Claude Code workload.
fast claude onCodex
OpenAI-compatible Responses API with a reversible Codex configuration.
fast codex onGrok
Chat completions with a catalog-backed section for each supported alias.
fast grok onOpenCode
Chat completions with Inference.net models registered as an OpenCode provider.
fast opencode onPi
Chat completions with model and provider settings written for Pi Agent.
fast pi onHermes
Hermes provider configuration is documented while its CLI adapter is in preview.
CLI adapter in previewOpenClaw
OpenClaw provider routing is documented while its CLI adapter is in preview.
CLI adapter in previewFx
Fx gateway configuration is documented while its CLI adapter is in preview.
CLI adapter in previewCursor
Cursor base URL routing is documented while its CLI adapter is in preview.
CLI adapter in previewFrequently asked questions about Gemini 3.1 Pro Preview
On Inference.net, Gemini 3.1 Pro Preview is priced at $2.00 per 1M input tokens and $12.00 per 1M output tokens. Cached input reads are $0.20 per 1M tokens (90% less than standard input). Prompts exceeding 200K input tokens use the long-context tier at $4.00/1M input and $18.00/1M output. Prompt caching is supported on long stable prefixes by marking system blocks with cache_control: { "type": "ephemeral" }.
Gemini 3.1 Pro Preview supports a 1M tokens (1,048,576) input context window and up to 66K tokens (65,536) output tokens per request. It accepts text and image input and produces text output.
Gemini 3.1 Pro Preview supports tool calling, structured outputs (JSON Schema), JSON object mode, and image vision inputs. It is callable over /v1/chat/completions, /v1/responses, and /v1/messages on Inference.net.
Yes. Zero Data Retention (ZDR) is enabled by default for new accounts on Inference.net, so prompts and outputs sent to Gemini 3.1 Pro Preview are not retained after processing. Inference.net is SOC 2 Type 2 compliant; see our ZDR policy for full details. Requests are served via the global api.inference.net endpoint.
Yes. Point the official OpenAI TypeScript or Python SDK (or any OpenAI-compatible coding agent) to https://api.inference.net/v1 with your Inference.net API key and set model to "gemini-3.1-pro-preview".
Start building with Gemini 3.1 Pro Preview today
Serverless, OpenAI-compatible, and billed per token. No commitments.