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.
- Input
- $2.00 / 1M tokens
- Output
- $12.00 / 1M tokens
- Context window
- 1,000,000 tokens
- Max output
- 65,536 tokens
- Providers
- 2
- Added to LiteLLM
- August 18, 2026
Gemini 3.1 Pro pricing by provider
2 listings across 2 providers. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.
| Provider | Model name in LiteLLM | Input | Output | Cache read | Cache write | 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 | $2.50 | 1M |
What Gemini 3.1 Pro costs in practice
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 |
Gemini 3.1 Pro features
- Function calling
- Structured output
- Image input
- Audio input
- Video input
- Reasoning
- Prompt caching
Use Gemini 3.1 Pro with LiteLLM
Call Gemini 3.1 Pro 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.
from litellm import completion
response = completion(
model="deepinfra/google/gemini-3.1-pro",
messages=[{"role": "user", "content": "Hello!"}],
)model_list:
- model_name: gemini-3-1-pro
litellm_params:
model: deepinfra/google/gemini-3.1-pro
api_key: os.environ/DEEPINFRA_API_KEYcurl 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",
"messages": [{"role": "user", "content": "Hello!"}]
}'Gemini 3.1 Pro 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.
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: DeepInfra, Databricks.
Provider pages: DeepInfra, Databricks.
