Gemini 3.1 Flash Image Preview API Pricing
gemini/gemini-3.1-flash-image-preview- Price
- $0.045 per image
- Context
- 64K tokens
- Max output
- 64K tokens
As of November 24, 2026, Gemini 3.1 Flash Image Preview costs $0.045 per image on Google AI Studio, plus $0.50 per 1M input tokens. Across 3 providers on LiteLLM, the price ranges from $0.045 to $0.08. It has a 65,536-token context window and returns up to 65,536 tokens per response.
gemini/gemini-3.1-flash-image-preview.Gemini 3.1 Flash Image Preview pricing by provider
4 listings across 3 providers. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.
| Provider | Model name in LiteLLM | Per image | Input | Output | Image output | Cache read | Batch in | Batch out | Context |
|---|---|---|---|---|---|---|---|---|---|
| Google AI Studio | gemini/gemini-3.1-flash-image-preview | $0.045 | $0.50 | $3.00 | $60.00 | – | $0.25 | $1.50 | 64K |
| Google Vertex AI | vertex_ai/gemini-3.1-flash-image-preview | $0.0672 | $0.50 | $3.00 | $60.00 | $0.05 | $0.25 | $1.50 | 64K |
| fal | fal_ai/fal-ai/gemini-3.1-flash-image-preview | $0.08 | – | – | – | – | – | – | – |
| fal | fal_ai/fal-ai/gemini-3.1-flash-image-preview/edit | $0.08 | – | – | – | – | – | – | – |
Other Gemini 3.1 Flash Image Preview prices on Google AI Studio
| Web search | $14.00 per 1K searches |
What Gemini 3.1 Flash Image Preview 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 Preview features
Input: text, image. Output: text, image.
- Function calling
- Structured output
- Image input
- Reasoning
- Prompt caching
- Web search
Use Gemini 3.1 Flash Image Preview with LiteLLM
Call Gemini 3.1 Flash Image Preview 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.
from litellm import image_generation
response = image_generation(
model="gemini/gemini-3.1-flash-image-preview",
prompt="A cute baby sea otter",
)model_list:
- model_name: gemini-3.1-flash-image-preview
litellm_params:
model: gemini/gemini-3.1-flash-image-preview
api_key: os.environ/GEMINI_API_KEYcurl http://0.0.0.0:4000/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LITELLM_API_KEY" \
-d '{
"model": "gemini-3.1-flash-image-preview",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024"
}'Gemini 3.1 Flash Image Preview FAQ
How much does Gemini 3.1 Flash Image Preview cost?
Gemini 3.1 Flash Image Preview 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 3 providers on LiteLLM, the price ranges from $0.045 to $0.08.
What is the context window of Gemini 3.1 Flash Image Preview?
Gemini 3.1 Flash Image Preview has a 65,536-token context window and returns up to 65,536 tokens per response.
Which providers offer Gemini 3.1 Flash Image Preview?
Gemini 3.1 Flash Image Preview is available from 3 providers through LiteLLM: Google AI Studio, Google Vertex AI and fal. The lowest price is on Google AI Studio.
How do I call Gemini 3.1 Flash Image Preview with an OpenAI-compatible API?
Use the LiteLLM Python SDK with model="gemini/gemini-3.1-flash-image-preview", 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 Preview support?
Gemini 3.1 Flash Image Preview supports image input, reasoning, prompt caching and web search. It does not support function calling and structured output.
When did LiteLLM add Gemini 3.1 Flash Image Preview?
Gemini 3.1 Flash Image Preview was added to LiteLLM's model price file in March 2026.
Is Gemini 3.1 Flash Image Preview being deprecated?
Google AI Studio deprecated gemini/gemini-3.1-flash-image-preview on June 25, 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. Maintainers update it from each provider's published pricing, and this page is usually rebuilt within 20 minutes of every change. Provider pricing pages:
- ai.google.dev/gemini-api/docs/pricing
- cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing
- fal.ai/models/fal-ai/gemini-3.1-flash-image-preview
- fal.ai/models/fal-ai/gemini-3.1-flash-image-preview/edit
LiteLLM docs: Google AI Studio, Google Vertex AI, fal.
Provider pages: Google AI Studio, Google Vertex AI, fal.