# 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.

- Page: https://models.litellm.ai/models/gemini-3.1-flash-image
- Lab: Google
- LiteLLM model name: `gemini/gemini-3.1-flash-image`
- Context window: 131,072 tokens
- Max output: 32,768 tokens
- Added to LiteLLM: June 29, 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 |
|---|---|---|---|---|---|---|---|
| Google AI Studio | `gemini/gemini-3.1-flash-image` | $0.50 | $3.00 | – | $0.045 | – | 128K |
| Google Vertex AI | `vertex_ai/gemini-3.1-flash-image` | $0.50 | $3.00 | $0.05 | $0.0672 | – | 64K |
| Databricks | `databricks/databricks-gemini-3-1-flash-image` | – | – | – | – | – | 128K |
| fal | `fal_ai/fal-ai/nano-banana-2` | – | – | – | $0.08 | – | – |

## Cost examples

Generating 1,000 images:

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

## Features

Supported: Image input, PDF input, Reasoning, Web search.
Not supported: Function calling, Structured output, Prompt caching.

## Use it with LiteLLM

```python
from litellm import image_generation

response = image_generation(
    model="gemini/gemini-3.1-flash-image",
    prompt="A cute baby sea otter",
)
```

## 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.

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