LiteLLMModels

Gemini 3.1 Flash Image API Pricing

As of October 10, 2026, Gemini 3.1 Flash Image costs $0.045 per image on Google AI Studio, plus $0.50 per 1M input tokens. Across 4 providers on LiteLLM, the price ranges from $0.045 to $0.08. It has a 131,072-token context window and returns up to 32,768 tokens per response.

By GoogleModel ID gemini/gemini-3.1-flash-imagePrices updated Checked
Per image
$0.045
Input
$0.50 / 1M tokens
Output
$3.00 / 1M tokens
Context window
131,072 tokens
Max output
32,768 tokens
Providers
4
Added to LiteLLM
June 29, 2026

Gemini 3.1 Flash Image 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 imageInputOutputImage outputCache readBatch inBatch outContext
Google AI Studiogemini/gemini-3.1-flash-image$0.045$0.50$3.00$60.00–$0.25$1.50128K
Google Vertex AIvertex_ai/gemini-3.1-flash-image$0.0672$0.50$3.00$60.00$0.05$0.25$1.5064K
Databricksdatabricks/databricks-gemini-3-1-flash-image–––––––128K
falfal_ai/fal-ai/nano-banana-2$0.08–––––––

Other Gemini 3.1 Flash Image prices on Google AI Studio

Web search$14.00 per 1K searches

What Gemini 3.1 Flash Image costs in practice

Generating 1,000 images

Google AI Studio$45.00
Google Vertex AI$67.20
fal$80.00

Gemini 3.1 Flash Image features

Input: text, image. Output: text, image.

Use Gemini 3.1 Flash Image with LiteLLM

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

Python SDK
from litellm import image_generation

response = image_generation(
    model="gemini/gemini-3.1-flash-image",
    prompt="A cute baby sea otter",
)
Proxy config.yaml
model_list:
  - model_name: gemini-3.1-flash-image
    litellm_params:
      model: gemini/gemini-3.1-flash-image
      api_key: os.environ/GEMINI_API_KEY
Call the proxy
curl http://0.0.0.0:4000/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-1234" \
  -d '{
    "model": "gemini-3.1-flash-image",
    "prompt": "A cute baby sea otter",
    "n": 1,
    "size": "1024x1024"
  }'

Gemini 3.1 Flash Image FAQ

How much does Gemini 3.1 Flash Image cost?

Gemini 3.1 Flash Image costs $0.045 per image on Google AI Studio, plus $0.50 per 1M input tokens. Batch requests cost $0.25 per 1M input tokens and $1.50 per 1M output tokens. Across 4 providers on LiteLLM, the price ranges from $0.045 to $0.08.

What is the context window of Gemini 3.1 Flash Image?

Gemini 3.1 Flash Image has a 131,072-token context window and returns up to 32,768 tokens per response.

Which providers offer Gemini 3.1 Flash Image?

Gemini 3.1 Flash Image is available from 4 providers through LiteLLM: Google AI Studio, Google Vertex AI, Databricks and fal. The lowest price is on Google AI Studio.

How do I call Gemini 3.1 Flash Image with an OpenAI-compatible API?

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

What features does Gemini 3.1 Flash Image support?

Gemini 3.1 Flash Image supports image input, PDF input, reasoning and web search. It does not support function calling, structured output and prompt caching.

When did LiteLLM add Gemini 3.1 Flash Image?

Gemini 3.1 Flash Image was added to LiteLLM's model price file on June 29, 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, Google Vertex AI, Databricks, fal.

Provider pages: Google AI Studio, Google Vertex AI, Databricks, fal.