Grok Imagine Video 1.5 is now available. xAI's latest video model: text-to-video and first-frame image-to-video with sound, 1–15 sec, up to native 1080p.Learn more
Google

Gemini 3.1 Pro

Save 70%

google/gemini-3.1-pro-preview

Gemini 3.1 Pro — Google flagship for advanced math, code, and reasoning.

Context window
1M
Max output
64K
Input modalities
text · image · video · file
Output modalities
text
Capabilities
Vision · Reasoning · Tool calling · JSON mode · Coding · Video input
RouteMux name
google/gemini-3.1-pro-preview
Live model playground

Try Gemini 3.1 Pro here

Tune the request, see the current price ceiling, and inspect the real response without leaving this model page.

streamchat
1Configure input
0 / 20,000
Add images

Sign in first to upload images to this vision model.

Maximum estimated cost—
2Live result

Your result will appear here

Enter an input on the left. The same RouteMux Playground execution and billing path powers this embedded test.

conversation

Gemini 3.1 Pro API pricing

Prices verified 2026-06-08

InputOfficial $2 / M tokens
$0.6/ M tokensSave 70%
OutputOfficial $12 / M tokens
$3.6/ M tokensSave 70%

Cache read $0.06/M · Cache write —/M

TierInputCache readCache writeOutput
Standard ≤200K$0.6$2−70%$0.06$0.2−70%—$3.6$12−70%
Standard$0.6$2−70%$0.06$0.2−70%—$3.6$12−70%
Standard >200K$1.2$4−70%$0.12$0.4−70%—$5.4$18−70%

Estimate cost

Estimated cost$0.0096

Limited time10% extra Credits on your first top-up — up to 200 bonus Credits

Applies to your first top-up within 72 hours of signing up. Minimum $20, once per account.

Sign up and claimNo subscription. Pay for what you use.

Key capabilities

VisionReasoningTool callingJSON modeCodingVideo input

Interface and protocols

OpenAI Chat CompletionsStreamingGoogle Vertex AIStreaming

Use any of these IDs to call this model via the API.

RouteMux namegoogle/gemini-3.1-pro-preview

Replace the ROUTEMUX_KEY placeholder with your API key. Create one →

from openai import OpenAI

client = OpenAI(
    base_url="https://api.routemux.com/v1",
    api_key="<ROUTEMUX_KEY>",
)

completion = client.chat.completions.create(
    model="google/gemini-3.1-pro-preview",
    messages=[{"role": "user", "content": "What is the meaning of life?"}],
)
print(completion.choices[0].message.content)
base_url: https://api.routemux.com/v1

Performance (last 30 days)

Gemini 3.1 Pro FAQ

›What is Gemini 3.1 Pro?

Gemini 3.1 Pro — Google flagship for advanced math, code, and reasoning.

›How large is the context window of Gemini 3.1 Pro?

Gemini 3.1 Pro supports a context window of up to 1M tokens, with up to 64K output tokens per request.

›How much does the Gemini 3.1 Pro API cost?

Through RouteMux, Gemini 3.1 Pro costs $0.6 for input and $3.6 for output (USD per 1M tokens), below the official list price.

›How do I call Gemini 3.1 Pro via API?

Gemini 3.1 Pro is OpenAI-compatible: point your base URL at RouteMux and set the model field to google/gemini-3.1-pro-preview — no code changes needed.

›Which input and output modalities does Gemini 3.1 Pro support?

Gemini 3.1 Pro accepts text, image, video, file as input and produces text as output.