chat.gemini_3_1_pro_preview
google/gemini-3-1-pro-preview

The Gemini 3.1 Pro API is Google's flagship multimodal reasoning model — a 1M-token context window, native input for text, images, audio, video and PDF, advanced reasoning, function calling, and structured JSON outputs. The Gemini 3.1 Pro API is OpenAI-compatible: point any existing SDK at RouterBase and set the model to gemini-3-1-pro-preview. Input at $1.40 / 1M tokens, output at $8.40 / 1M tokens, cache reads at $0.14 / 1M tokens — 5% below the standard rate (base rate for prompts up to 200K tokens), all through one REST endpoint.

Input
Gemini 3.1 Pro (Preview)
max_tokens4096
temperature1
top_p1
presence_penalty0
frequency_penalty0
Gemini 3.1 Pro (Preview) Online
Hi! I'm a helpful AI assistant. What can I do for you?

Gemini 3.1 Pro API: Chat

Use the Gemini 3.1 Pro API to run Google's flagship multimodal reasoning model with a 1M-token context window.

The Gemini 3.1 Pro API is Google's flagship Gemini Pro model — a 1M-token context window, native multimodal input (text, images, audio, video, PDF), advanced reasoning, function calling, and structured JSON outputs. Routed through RouterBase, it is fully OpenAI-compatible: point any existing SDK at RouterBase's base URL, set the model to gemini-3-1-pro-preview, and your first call goes through immediately.

Pricing is $1.40 / 1M input tokens, $8.40 / 1M output tokens, and $0.14 / 1M cached-input reads — 5% below the standard rate. The base rate applies to prompts up to 200K tokens. One RouterBase key — no Google credentials required.

Why this model

Six reasons teams ship on the Gemini 3.1 Pro API

From 1M-token multimodal context to 5%-off pricing — what makes Gemini 3.1 Pro stand out.

1M-token context

Accepts up to 1 million tokens per request (base rate for prompts up to 200K) — entire codebases, long documents, or video transcripts fit in a single Gemini 3.1 Pro API call.

Native multimodal input

The Gemini 3.1 Pro API understands text, images, audio, video, and PDFs. Pass mixed media in one request to analyze, transcribe, or reason across modalities.

Advanced reasoning

Gemini 3.1 Pro thinks before it answers, allocating extra compute to hard problems — strong at multi-step math, coding, and complex analysis.

Function calling & JSON

Define tools and request a JSON schema; the Gemini 3.1 Pro API returns structured tool calls and strictly valid JSON for reliable agent and extraction pipelines.

OpenAI-compatible endpoint

The Gemini 3.1 Pro API speaks the OpenAI chat-completions wire format. Point any OpenAI SDK at RouterBase — no Google SDK or separate credentials needed.

One key for 200+ models

The same RouterBase key that calls the Gemini 3.1 Pro API also routes to GPT-5, Claude Opus 4.8, GPT-4o mini, and 200+ other models — no per-provider credential management.

RouterBase dashboard preview
Quickstart

Get started with the Gemini 3.1 Pro API in 3 steps

From sign-up to your first response in under 5 minutes.

  1. Create a RouterBase API key

    Sign up and generate an API key — one key reaches the Gemini 3.1 Pro API and every other model in the catalog.

  2. Send your first message

    Point any OpenAI-compatible SDK at routerbase.com/v1 and set the model to gemini-3-1-pro-preview. The response follows the standard chat-completions schema — streaming and multimodal input supported.

  3. Inspect usage

    Every response includes a detailed token breakdown — input, output, and cache-read tokens — so cost and cache-hit rate are visible on every call.

Pricing

Pay only for what you use

RouterBase passes through partner-tier pricing. Compared against the model's official published API rate.

Customer stories

What teams build with the Gemini 3.1 Pro API

Real production loads running on the Gemini 3.1 Pro API and the RouterBase model catalog.

Marcus Reyes
Marcus ReyesCTO, Paradigm AI

The Gemini 3.1 Pro API handles our 800K-token document sets in one call — no chunking, no retrieval glue. The 1M context changed how we build.

Priya Lakshmi
Priya LakshmiFounder, Quillo

We feed video and PDFs straight into the Gemini 3.1 Pro API — one multimodal call replaced three separate pipelines.

Thomas Beck
Thomas BeckStaff Engineer, Northbeam

Switching to the Gemini 3.1 Pro API was a two-line change through RouterBase. Reasoning quality jumped and the 5% discount is pure margin.

Aoi Tanaka
Aoi TanakaML Lead, Daybreak Robotics

Gemini 3.1 Pro's reasoning solved planning tasks our previous model couldn't touch. Accuracy up 31% on our internal benchmark.

Jonas Keller
Jonas KellerIndie Developer

A million tokens of context means I can throw a whole repo plus the docs at the Gemini 3.1 Pro API. No more chunking glue.

Ethan Nguyen
Ethan NguyenHead of Engineering, Compound Studio

RouterBase puts the Gemini 3.1 Pro API and 200+ other models behind one key. Our team stopped filing requests for new provider accounts.

Sophia Martín
Sophia MartínCTO, Relay

Structured JSON outputs from the Gemini 3.1 Pro API killed our flaky parsing — strictly valid JSON every time, even on multimodal inputs.

Lucas Fernandes
Lucas FernandesEngineering Manager, Light

We migrated 42 services to the Gemini 3.1 Pro API over a weekend. The only PR comment was 'wait, that's all?'.

David Okonkwo
David OkonkwoCo-founder, Figment

Cache reads at $0.14 / 1M on the Gemini 3.1 Pro API made our long-context features affordable. The ROI math was instant.

Frequently Asked Questions

Common questions about the Gemini 3.1 Pro API.

It is RouterBase's pass-through to Google's Gemini 3.1 Pro — a flagship multimodal chat endpoint with a 1M-token context, advanced reasoning, native vision/audio/video input, function calling, and structured outputs, served via an OpenAI-compatible REST interface.