LiteLLMModels

Gemini 3.1 Pro Preview API Pricing

As of October 10, 2026, Gemini 3.1 Pro Preview costs $2.00 per 1M input tokens and $12.00 per 1M output tokens on Google AI Studio, with cache reads at $0.20 per 1M tokens. It has a 1,048,576-token context window and returns up to 65,536 tokens per response.

By GoogleModel ID gemini/gemini-3.1-pro-previewPrices updated Checked
Input
$2.00 / 1M tokens
Output
$12.00 / 1M tokens
Cache read
$0.20 / 1M tokens
Context window
1,048,576 tokens
Max output
65,536 tokens
Providers
4
Added to LiteLLM
February 2026

Gemini 3.1 Pro Preview pricing by provider

4 listings across 4 providers. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.

ProviderModel name in LiteLLMPer imageInputOutputCache readBatch inBatch outContext
Google AI Studiogemini/gemini-3.1-pro-preview–$2.00$12.00$0.20$1.00$6.001M
AIHubMixaihubmix/gemini-3.1-pro-preview–$2.00$12.00$0.20––1M
Google Vertex AIvertex_ai/gemini-3.1-pro-preview$0.00012$2.00$12.00$0.20$1.00$6.001M
Perplexityperplexity/google/gemini-3.1-pro-preview–$2.00$12.00$0.20–––

Other Gemini 3.1 Pro Preview prices on Google AI Studio

Priority input$3.60 per 1M tokens
Priority output$21.60 per 1M tokens
Flex input$1.00 per 1M tokens
Flex output$6.00 per 1M tokens
Input above 200K tokens$4.00 per 1M tokens
Output above 200K tokens$18.00 per 1M tokens
Cache read above 200K tokens$0.40 per 1M tokens
Web search$14.00 per 1K searches

What Gemini 3.1 Pro Preview costs in practice

1,000 requests with 2,000 input and 500 output tokens each

Google AI Studio$10.00
AIHubMix$10.00
Google Vertex AI$10.00
Perplexity$10.00
Google AI Studio batch$5.00

100 long-document requests with 100,000 input and 2,000 output tokens each

Google AI Studio$22.40
AIHubMix$22.40
Google Vertex AI$22.40
Perplexity$22.40

Gemini 3.1 Pro Preview features

Input: text, image, audio, video. Output: text.

Use Gemini 3.1 Pro Preview with LiteLLM

Call Gemini 3.1 Pro Preview through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/chat/completions. LiteLLM tracks the cost of every request at these prices.

Python SDK
from litellm import completion

response = completion(
    model="gemini/gemini-3.1-pro-preview",
    messages=[{"role": "user", "content": "Hello!"}],
)
Proxy config.yaml
model_list:
  - model_name: gemini-3.1-pro-preview
    litellm_params:
      model: gemini/gemini-3.1-pro-preview
      api_key: os.environ/GEMINI_API_KEY
Call the proxy
curl http://0.0.0.0:4000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-1234" \
  -d '{
    "model": "gemini-3.1-pro-preview",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Gemini 3.1 Pro Preview FAQ

How much does Gemini 3.1 Pro Preview cost?

Gemini 3.1 Pro Preview costs $2.00 per 1M input tokens and $12.00 per 1M output tokens on Google AI Studio, with cache reads at $0.20 per 1M tokens. Batch requests cost $1.00 per 1M input tokens and $6.00 per 1M output tokens. Above 200K input tokens, input costs $4.00 and output costs $18.00 per 1M tokens.

What is the context window of Gemini 3.1 Pro Preview?

Gemini 3.1 Pro Preview has a 1,048,576-token context window and returns up to 65,536 tokens per response.

Which providers offer Gemini 3.1 Pro Preview?

Gemini 3.1 Pro Preview is available from 4 providers through LiteLLM: Google AI Studio, AIHubMix, Google Vertex AI and Perplexity.

How do I call Gemini 3.1 Pro Preview with an OpenAI-compatible API?

Use the LiteLLM Python SDK with model="gemini/gemini-3.1-pro-preview", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.

What features does Gemini 3.1 Pro Preview support?

Gemini 3.1 Pro Preview supports function calling, structured output, image input, PDF input, audio input, video input, reasoning, prompt caching and web search.

When did LiteLLM add Gemini 3.1 Pro Preview?

Gemini 3.1 Pro Preview was added to LiteLLM's model price file in February 2026.

Sources

Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:

LiteLLM docs: Google AI Studio, AIHubMix, Google Vertex AI, Perplexity.

Provider pages: Google AI Studio, AIHubMix, Google Vertex AI, Perplexity.