Google · Fast, low-cost image generation

Gemini 3.1 Flash Image Preview API

The Gemini 3.1 Flash image preview is the cost-effective tier for batch generation: $0.0122 per request on OpenLux, 92% below the official list rate, on the same endpoint as the rest of the catalogue.

GoogleImage-92% vs official rates

Pay-as-you-go rate

$0.0122 / request

-92% vs official list pricing. Billed in USD, metered per request with real-time cost in the console.

Access

One OpenLux key and the OpenAI-compatible endpoint: set base_url to https://openlux.lol/v1 and pass gemini-3.1-flash-image-preview as the model.

Get started

Create a key in the console, then follow the five-minute docs for streaming, tools and error codes.

What Gemini 3.1 Flash Image Preview delivers

Gemini 3.1 Flash image is built for throughput. When a pipeline needs dozens or hundreds of images — catalogue shots, cards, thumbnails, variations for testing — the flash tier keeps latency and cost low while staying consistent with the composition described in the prompt.

It shares behaviour with the Pro image preview: prompts describe the scene, references guide style, and iterations refine a result rather than replacing it. The difference is where the balance sits: flash favours volume and speed, Pro favours fidelity.

At $0.0122 per request it is the second cheapest image model on OpenLux after gpt-image-2-c ($0.00882) and roughly half the price of the Gemini 3 Pro image preview ($0.0243) — the tier to default to when a workflow generates more than it selects.

Call Gemini 3.1 Flash Image Preview in minutes

Every OpenLux model speaks the OpenAI protocol. Reuse your existing SDKs and replace two values: the base URL and the API key.

cURL

curl https://openlux.lol/v1/chat/completions \
  -H "Authorization: Bearer $OPENLUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-image-preview",
    "messages": [{"role": "user", "content": "A soft abstract render of translucent orange glass petals on a warm white background, minimal and clean."}]
  }'

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    api_key="sk-openlux-...",
    base_url="https://openlux.lol/v1",
)

resp = client.chat.completions.create(
    model="gemini-3.1-flash-image-preview",
    messages=[{"role": "user", "content": "A soft abstract render of translucent orange glass petals on a warm white background, minimal and clean."}],
)
print(resp.choices[0].message.content)

Node.js (OpenAI SDK)

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPENLUX_API_KEY,
  baseURL: "https://openlux.lol/v1",
});

const resp = await client.chat.completions.create({
  model: "gemini-3.1-flash-image-preview",
  messages: [{ role: "user", content: "A soft abstract render of translucent orange glass petals on a warm white background, minimal and clean." }],
});
console.log(resp.choices[0].message.content);

Where Gemini 3.1 Flash Image Preview fits

Batch generation

Low per-request cost for pipelines that produce many assets per run, such as catalogues and social feeds.

Consistent composition

Keeps subject, framing and palette stable across a series, so a set of assets looks like one campaign.

Prompt variety

Explores styles, backgrounds and angles quickly — useful for picking a direction before spending on higher tiers.

Preview pricing

Metered at $0.0122 per request, 92% off list, with no minimum spend or subscription.

Catalogue imagery

Generate on-brand visuals for large product or content sets where per-asset cost decides whether the workflow scales.

Social and editorial

Produce daily cards, headers and thumbnails in a pipeline that runs unattended.

A/B creative testing

Generate multiple variants per concept at a cost that makes testing many options practical.

How gemini-3.1-flash-image-preview is priced on OpenLux

Gemini 3.1 Flash Image Preview is metered pay as you go at $0.0122 / request (-92% vs official rates). There is no subscription requirement for API access: top up a balance, call the model, and see the cost of every request in the console.

ModelProviderRateDiscount
gemini-3.1-flash-image-preview (this model)Google$0.0122 / request-92%
gemini-3-pro-image-previewGoogle$0.0243 / request-91%
flux-2-proFlux$0.021 / request—
gpt-image-2-cOpenAI$0.00882 / request-93%

Rates follow official provider pricing and are shown in USD. See the full model catalogue and pricing plans for credit allowances.

Gemini 3.1 Flash Image Preview questions

How much does the Gemini 3.1 Flash image preview cost on OpenLux?

$0.0122 per request, 92% below the official list price, billed pay as you go with per-request visibility in the console.

How do I call it?

Send "model": "gemini-3.1-flash-image-preview" to https://openlux.lol/v1 with your OpenLux API key — the same request shape as every other model.

When should I use flash instead of the Pro image preview?

Use flash when you generate many assets and select the best; use Pro when each asset must be right the first time. Both run on the same key and endpoint.

Can I mix text and image models in one workflow?

Yes. Text, image, audio and retrieval models share one endpoint, so a pipeline can draft copy with a text model and illustrate it with an image model under the same bill.

Start calling Gemini 3.1 Flash Image Preview today

Create an OpenLux key and send your first request in minutes. Compare Gemini 3.1 Flash Image Preview with the rest of the catalogue on the same endpoint and the same bill.

Create an API key Read the docs