- Images
Gemini 3.1 Flash Image API: pricing, capabilities and setup
Gemini 3.1 Flash Image API: Google's model for fast image generation from a text prompt and reference images, billed per image.
pay as you go · no subscription · key right after sign-up
How much Gemini 3.1 Flash Image costs
- Image$0.03per image
Cost calculator
500 pcs
- With llmbox
- $15.00
Specs
- Inputtext, images
Endpoints
/v1/images/generations
Setup in three steps
- 01Get a key
Sign up and create an API key in the dashboard.
Get a key → - 02Set the base URL
In any OpenAI-compatible client, point the API address to:
- 03Pass the model id
Put this identifier in the model field:
import base64
import os
from openai import OpenAI
client = OpenAI(
base_url="https://llmbox.cc/v1",
api_key=os.environ["LLMBOX_API_KEY"],
)
resp = client.images.generate(
model="google/gemini-3.1-flash-image",
prompt="A cat in a spacesuit on the Moon, watercolor",
n=1,
size="1024x1024",
)
with open("image.png", "wb") as f:
f.write(base64.b64decode(resp.data[0].b64_json))What Gemini 3.1 Flash Image is good for
Gemini 3.1 Flash Image is Google's image-generation model built for speed and volume. It takes a text prompt and, if needed, reference images as input, and returns finished pictures. On llmbox the model is available under the ID google/gemini-3.1-flash-image with the same API key as the catalog's text models — no Gemini API key from Google required.
What it's good for
- illustrations, covers and banners from a prompt;
- several variants for one task, so a person can pick the best;
- variations and edits based on an uploaded image;
- draft visuals for mockups and product cards.
Flash Image fits where you need many images quickly: an illustration for every blog post, previews for newsletters, sketches to discuss with a designer, a series of visuals for the product cards of one catalog. A reference helps keep a series in one style — the model makes variations of an uploaded image following your description.
It also works well paired with a text model: Gemini 3.1 Flash Lite turns a short brief into a detailed scene description, and Flash Image draws from it. Both models are called with one key, and the spend for both steps appears in one request log.
When it's not the right fit
If you need a more complex result — a multi-layered scene, fine detail, close adherence to a long description — try Gemini 3 Pro Image. A practical way to choose is to run the same prompts on both models and compare the results and cost in the request log in your dashboard. For text and JSON answers, Gemini 3.1 Flash Lite is the right model.
How to connect
The model is called from the OpenAI SDK or any HTTP client with an llmbox key; you don't need a separate Google account. It's best to run generation in the background and save finished images to your own storage. If generation is triggered from your interface, send the request through your own server: a key in browser or mobile code is visible to every user of the app. A sample request and details are in Images.
Gemini 3.1 Flash Image API pricing
The price is per image. You pay for each image you receive, from a prepaid balance as you go, with no subscription. The cost of every request is visible in the request log in your dashboard, and image models from other vendors are collected for a price comparison in the image models collection.
Typical tasks
- Illustrations and covers from a prompt
- Several variants for one task
- Edits and variations based on a reference
Gemini 3.1 Flash Image or Gemini 3 Pro Image?
| Model | Price |
|---|---|
| Gemini 3.1 Flash Image | $0.03 |
| Gemini 3 Pro Image | $0.04 |
Gemini 3.1 Flash Image vs neighbours
| Model | Price |
|---|---|
| Gemini 3.1 Flash Image | $0.03 |
| Gemini 3 Pro Image | $0.04 |
| GPT Image 2 OpenAI | from $0.09 |
Other Google models
Articles about the model

Image generation API: product photos and banners
Image generation API for product cards and banners: use GPT Image 2, Nano Banana Pro and Qwen-Image with one key, plus curl and Python examples and prompt tips.

Images: the price depends on resolution and quality
For GPT Image 2, the price of an image depends on resolution and quality: a draft costs less than a final render. How to pick values and where to find the rate table.
FAQ
How do I connect Gemini 3.1 Flash Image through llmbox?
Create a key in the API keys section of your dashboard and call image generation in the OpenAI SDK with the llmbox base URL and the model google/gemini-3.1-flash-image. A sample request is on this page; details are in the Images section of the docs.
How is generation billed?
You pay for each image you receive. The price per image is on this page, and it is deducted from your prepaid balance — there is no subscription.
Can I pass a reference image?
Yes. Along with the reference, describe what you want to get, and the model will make a variation or an edit based on it.
How is it different from Gemini 3 Pro Image?
Flash Image is the smaller model for fast, high-volume generation; Pro Image is the larger one, for complex scenes. Both are called the same way, and you switch by changing the model ID.
Do I need a Gemini API key or a Google Cloud account?
No. Requests use an llmbox key from your dashboard; the same key works with every other model in the catalog.