# Gemini 3.1 Pro API Pricing

As of October 10, 2026, Gemini 3.1 Pro costs $2.00 per 1M input tokens and $12.00 per 1M output tokens from DeepInfra, the lowest of 2 providers. It has a 1,000,000-token context window and returns up to 65,536 tokens per response.

- Page: https://models.litellm.ai/models/gemini-3-1-pro
- Lab: Google
- LiteLLM model name: `deepinfra/google/gemini-3.1-pro`
- Context window: 1,000,000 tokens
- Max output: 65,536 tokens
- Added to LiteLLM: August 18, 2026
- Prices updated: October 10, 2026

## Pricing by provider

Token prices in USD per 1M tokens.

| Provider | Model name | Input | Output | Cache read | Per image | Per second | Context |
|---|---|---|---|---|---|---|---|
| DeepInfra | `deepinfra/google/gemini-3.1-pro` | $2.00 | $12.00 | – | – | – | 1M |
| Databricks | `databricks/databricks-gemini-3-1-pro` | $2.50 | $15.00 | $0.25 | – | – | 1M |

## Cost examples

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

- DeepInfra: $10.00
- Databricks: $12.50

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

- DeepInfra: $22.40
- Databricks: $28.00

## Features

Supported: Function calling, Structured output, Image input, Audio input, Video input, Reasoning, Prompt caching.

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="deepinfra/google/gemini-3.1-pro",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

## FAQ

### How much does Gemini 3.1 Pro cost?

Gemini 3.1 Pro costs $2.00 per 1M input tokens and $12.00 per 1M output tokens from DeepInfra, the lowest of 2 providers.

### What is the context window of Gemini 3.1 Pro?

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

### Which providers offer Gemini 3.1 Pro?

Gemini 3.1 Pro is available from 2 providers through LiteLLM: DeepInfra and Databricks. The lowest price is on DeepInfra.

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

Use the LiteLLM Python SDK with model="deepinfra/google/gemini-3.1-pro", 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 support?

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

### When did LiteLLM add Gemini 3.1 Pro?

Gemini 3.1 Pro was added to LiteLLM's model price file on August 18, 2026.

Source: LiteLLM model price file, https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json
