Bonus: Top up now and we'll double your first deposit — get x2 credits instantly.

Gemini 3.1 Pro (Preview) API: Endpoint & Pricing

Gemini 3.1 Pro Preview is a preview large language model from Google’s Gemini family, offering advanced reasoning and multimodal capabilities for early experimentation and feedback.

Compare Gemini 3.1 Pro (Preview) alternatives (4) →

What is Gemini 3.1 Pro Preview?

Gemini 3.1 Pro Preview is an experimental version of Google’s Gemini 3.1 Pro large language model made available for limited testing. It is primarily used by developers and researchers to explore its capabilities in tasks such as code assistance, structured reasoning, and information retrieval. It is also used to prototype multimodal and agentic applications so Google can refine quality, safety, and performance. It belongs to the Gemini model family, following earlier Gemini 1.x and 2.x generations and the non-preview Gemini Pro variants.


Can you self-host Gemini 3.1 Pro Preview?

No. We found no public weights for Gemini 3.1 Pro Preview on Hugging Face, so there is nothing to download, quantize or serve on your own GPUs: no VRAM budget, no vLLM or GGUF build to plan for. The only way to run it is over an API.

Skip the deploy — use LLM.API as your endpoint

No GPUs, no quantization trade-offs. Same model, OpenAI-compatible, with custom volume discounts on request.

Providers

Different companies host the same model. OpenRouter routes your request to one of them based on the routing mode you pick — Balanced (price + speed), Nitro (fastest), or Exacto (highest tool-calling accuracy).

List price by provider

InputOutput
google-ai-studio$2 in
$12 out
google-vertex$2 in
$12 out

Provider list prices; the LLM.API discount applies on top.

Provider Input Output Cache read /M Latency Throughput Uptime
google-ai-studioin $2; out $12 per 1M tokens1M tokensvision, tools, streaming, reasoning, JSON
google-vertexin $2; out $12 per 1M tokens1M tokensvision, tools, streaming, reasoning, JSON

Prices and availability from the LLMAPI catalogue, updated nightly. Last updated 11 Oct 2026.

Try this model

Test Gemini 3.1 Pro Preview right here — free to start.

Gemini 3.1 Pro Preview
Hi! Want to test the model?

Suggestions for your first prompt

Code snippet

Call the model through the OpenAI-compatible API.

Switching from OpenAI? Change 2 lines.

- base_url="https://api.openai.com/v1"
- api_key="YOUR_OPENAI_KEY"
+ base_url="https://api.llmapi.ai/v1"
+ api_key="YOUR_LLMAPI_KEY"

Everything else stays the same — SDK, message format, tools, streaming. Set model to gemini-3.1-pro-preview and the call runs unchanged.

bash
curl https://api.llmapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $LLMAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-pro-preview",
    "messages": [
      {"role": "user", "content": "Give me three crisp launch checklist items."}
    ],
  "reasoning_effort": "low"
  }'
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_LLMAPI_KEY",
    base_url="https://api.llmapi.ai/v1",
)

resp = client.chat.completions.create(
    model="gemini-3.1-pro-preview",
    messages=[
        {"role": "system", "content": "You are a precise product assistant."},
        {"role": "user", "content": "Give me three crisp launch checklist items."},
    ],
    reasoning_effort="low",
)
print(resp.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.LLMAPI_KEY,
  baseURL: "https://api.llmapi.ai/v1",
});

const resp = await client.chat.completions.create({
  model: "gemini-3.1-pro-preview",
  messages: [
    { role: "user", content: "Give me three crisp launch checklist items." },
  ],
});

console.log(resp.choices[0].message.content);
stream = client.chat.completions.create(
    model="gemini-3.1-pro-preview",
    messages=[{"role": "user", "content": "Write a haiku about latency."}],
    stream=True,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="", flush=True)
{
  "model": "gemini-3.1-pro-preview",
  "messages": [
    {"role": "system", "content": "You are a precise product assistant."},
    {"role": "user", "content": "Give me three crisp launch checklist items."}
  ],
  "reasoning_effort": "low"
}

Supported endpoints & features

Base URL https://api.llmapi.ai/v1 · model ID gemini-3.1-pro-preview · OpenAI-compatible.

  • POST /v1/chat/completionsChat Completions — supported
FeatureStatusHow to set it
Function calling (tools)Supportedtools, tool_choice
Parallel tool callsNot supportedparallel_tool_calls
JSON modeSupportedresponse_format: {"type": "json_object"}
Structured outputsNot supportedresponse_format: {"type": "json_schema", …}
StreamingSupportedstream: true
Vision (image input)Supportedimage_url content parts
Web searchNot supportedweb_search
Reasoning effortlow · medium · highreasoning_effort: "low"

Errors & fallback routing

CodeWhat it meansWhat to do
401Missing or invalid API key.Send Authorization: Bearer YOUR_LLMAPI_KEY and check the key is active.
429Rate limited, or the upstream provider is throttling the request.Back off and retry with jitter; the gateway also retries the request on another provider where one is available.
5xxUpstream provider error or timeout.Retry; fallback routing sends the retry to the next healthy provider for this model.

When a provider fails or throttles, the request is routed to the next provider serving this model — the ones listed in the providers table above.

Uptime

30-Day Uptime
100.00%
Past Incidents (30d)
0
Error rate (24h)
0.00%

Last 30 days

30/30 days operational | 100.00% uptime

30 days ago Today
Operational Degraded Outage Maintenance
See All Incidents

Gemini 3.1 Pro (Preview) in production

What the model is good at.

  • Advanced Reasoning

    Performs complex logical reasoning and problem solving, excelling on benchmarks like ARC-AGI-2 and SWE-Bench for difficult tasks.

  • Multimodal Input

    Understands text, code, images, audio, video, and PDFs within a very long context window for rich cross-modal analysis.

  • Document Comprehension

    Processes and synthesizes information from large documents and datasets, supporting enterprise knowledge tasks and technical analysis.

  • Coding Assistance

    Supports code understanding and generation, autonomous software engineering tasks, and tool-assisted code execution workflows.

  • Multilingual Skills

    Handles multiple languages for reading and generation, enabling cross-language understanding and globally-deployed conversational applications.

What you get when you call Gemini 3.1 Pro (Preview) through LLM.API.

  • Unified AI Routing

    Dynamically route each request to the optimal model across providers based on latency, cost, or quality—without changing your integration or redeploying.

    One endpoint, every model
  • Cost-Aware Orchestration

    Control spend with per-route cost caps, dynamic model downgrades, and usage insights so you ship rich AI features without surprise bills.

    Cut spend, keep quality
  • Automatic Provider Fallback

    If a provider throttles or fails, LLM.API seamlessly retries on backup models, keeping your AI workflows online without custom failover logic.

    Resilience by default
  • End-to-End Observability

    Trace every request across models and providers with rich logs, metrics, and timelines to debug prompts, tune routing, and prove reliability in production.

    See every token
  • Task-Centric Abstractions

    Call higher-level tasks—chat, RAG, tools, moderation—instead of raw models, letting LLM.API manage prompts, memory, and orchestration under a stable interface.

    Code to tasks, not models
  • High-Throughput Batch APIs

    Process thousands of prompts in parallel with batch operations, reducing overhead, smoothing rate limits, and maximizing throughput for large-scale workloads.

    Scale from day one

When to Use — When NOT to Use

Use it if...

  • You need a general-purpose LLM from Google with strong text generation and understanding.
  • You need good integration with other Google Cloud services and existing GCP infrastructure.
  • Your use case involves multimodal inputs like combining text with images or screenshots.
  • You need a model suitable for chatbots, assistants, and interactive web or mobile experiences.
  • Your use case involves summarizing, classifying, or extracting information from medium-length documents.
  • You need a widely supported, mainstream model with extensive community examples and tooling.

Avoid if...

  • You need guaranteed mature, production-hardened behavior rather than a preview-stage model.
  • Your workload requires strict, contractually defined SLAs and long-term backward compatibility guarantees.
  • You need highly specialized domain performance better served by fine-tuned or niche expert models.
  • Your workload requires running fully on-premise or outside Google Cloud’s managed environments.
  • You need fully transparent, fine-grained control over training data, weights, and model internals.
  • Your workload requires ultra-low-latency inference for high-frequency trading or hard real-time systems.

LLM API rating for Gemini 3.1 Pro (Preview)

★ 4.2/ 5.0LLM API rating
50% production adoption · 30% category benchmark · 20% tooling & value
✓ Verified benchmark · LMArena + Artificial Analysis
4.8Production adoptionVery high production volume
3.7Benchmark qualityArtificial Analysis Intelligence Index 29.7 · LMArena text rank #16, Elo 1480
3.3Developer ecosystemContext window, tool and JSON support, price against the category median
Reasoning & chat 4.2Coding 4.1Vision & multimodal 4.2Tool & function calling 4.6Long context 4.6Voice & audio 4.0
How is this rating calculated?

Every model gets a separate 1.0–5.0 score for each category it can be used in, so a model can rate high for coding and lower for vision. The score combines three parts:

  1. Production adoption — 50%. How widely the model is actually used in production: provider traffic, LiteLLM and gateway usage, open-weight downloads and its LMArena rank. Proven, widely used models score highest.
  2. Category benchmark — 30%. The public benchmark that matters for that category — the Artificial Analysis Intelligence Index and LMArena Elo for reasoning, LMArena coding Elo for coding, image and document support plus vision Elo for vision, tool and JSON support for function calling, measured speed for voice.
  3. Tooling & value — 20%. Context window, support for tools, structured outputs and streaming, and price compared with the category median.

Scores of 4.0 and above are shown in green, 3.0–3.9 in yellow, below 3.0 in red. When a model has no public data for a part, it gets a neutral value instead of an invented number.

A “Verified benchmark” mark (✓) means an independent lab — LMArena or Artificial Analysis — has actually tested that model, and the source figure is shown. Models without that mark are labelled “Estimated from published specs”: the score comes from the published context window, tool and schema support, price and adoption only, because no independent lab has tested them yet.

One exception: a brand-new top-tier model that scores very high on the independent benchmarks but has no usage history yet is rated on the benchmark (60%) and tooling & value (40%) alone, so a missing adoption figure can't hold it back. All inputs come from public sources and are refreshed weekly.

Adoption and benchmark inputs come from public sources — LMArena, Artificial Analysis Intelligence Index and published model specs. Updated weekly.

What developers say about Gemini 3.1 Pro Preview

LMArena#16 · Elo 1480Arena coding#47 · Elo 1483Speed—Sources: LMArena, Artificial Analysis

Summarised from public developer discussions and write-ups. Opinions are the sources’, not LLM.API’s.

  • Developers on Reddit report the model excels at 1-million-token document synthesis and multi-turn state retention when 'Extended Thinking' is enabled, outperforming standard modes in connecting granular details across large contexts.
  • Developers note significant performance discrepancies between the Web client and API, observing that the Web version includes additional wrapper layers and system prompts that can result in lower performance.
  • Early testing by developers in Google AI Studio indicates significant latency issues during launch, with simple prompts taking over 100 seconds to respond or failing due to high demand and expired deadlines.

Frequently Asked Questions

  • What is Gemini 3.1 Pro Preview?

    Gemini 3.1 Pro Preview is a Google frontier language model optimized for high‑quality reasoning, coding, and general-purpose chat use cases.

  • What modalities does Gemini 3.1 Pro Preview support via LLM.API?

    Through LLM.API, Gemini 3.1 Pro Preview currently supports text input and output, with image and other modalities exposed as the provider enables them.

  • How is Gemini 3.1 Pro Preview typically priced on LLM.API?

    Gemini 3.1 Pro Preview is billed on a pay-as-you-go per-token basis, with separate input and output token rates defined by LLM.API.

  • What context window does Gemini 3.1 Pro Preview support?

    Gemini 3.1 Pro Preview supports a large context window suitable for multi-thousand token prompts and long conversations, as configured by LLM.API.

  • How fast is Gemini 3.1 Pro Preview in terms of latency?

    Typical latency is comparable to other large frontier models, with first-token times dependent on prompt size and current LLM.API and Google load.

  • What is Gemini 3.1 Pro Preview best suited for?

    It excels at multi-step reasoning, complex code generation, data analysis, and high-quality natural language generation across many domains.

  • How do I call Gemini 3.1 Pro Preview through LLM.API?

    You select the model name "google/gemini-3.1-pro-preview" (or similar identifier) in LLM.API and send standard chat or completion-style requests.

  • How does Gemini 3.1 Pro Preview compare to GPT-4.1 or Claude 3.5?

    Gemini 3.1 Pro Preview targets similar advanced reasoning and coding capabilities, but performance, cost, and latency vary by task and provider configuration.

  • Does Gemini 3.1 Pro Preview support streaming responses on LLM.API?

    Yes, when enabled in your LLM.API request, Gemini 3.1 Pro Preview can return tokens incrementally for lower perceived latency.

  • What are the main limitations of Gemini 3.1 Pro Preview?

    It can hallucinate, may contain training-data biases, and should not be relied on for authoritative legal, medical, or safety-critical decisions.

Get one key to every model

Swap your API key. Keep your code.