← Back to models
GoogleModel family

gemini-3.1-flash-image-preview

Selected variant API IDProvider XZ
Gemini 3.1 Flash Image Preview suits iterative image workflows, from quick drafts and illustrations to repeated visual refinements. This preview version has independent route pricing and a unique model ID.Read moreRead less

Gemini 3.1 Flash Image Preview suits iterative image workflows, from quick drafts and illustrations to repeated visual refinements. This preview version has independent route pricing and a unique model ID.

Providers

Different providers serve this model. Compare pricing and performance, select a provider, or use automatic routing.

ProviderVariant / API model IDApplicable priceRequest latencyRequest successConnect
gemini-3.1-flash-image-previewgemini-3.1-flash-image-preview-xz
¥0.10 / image1K · 1024x1024
16.82 s100.00%Use route ↗

Providers for the same API model ID currently share model pricing; variants have independent rates. A selected provider retries only within its own keys, never across variants or providers. Official badges apply to their individual routes.

Model data

Provider XZ · UTC

2026-10-30 00:00 — 2026-11-05 07:02 UTC

Requests

6
Requests10/31 UTC · 111/02 UTC · 211/03 UTC · 3
10/3011/05 UTC

Requests in the selected window, excluding refund records.

Request latency

16.82 s
Request latency10/31 UTC · 18.53 s11/02 UTC · 17.90 s11/03 UTC · 15.53 s
10/3011/05 UTC

Mean end-to-end duration of successful requests, not time to first token.

Request success rate

100.00%
EarlierLatest

Successful requests divided by total requests, not an SLA.

Output rate

—
Shown when valid samples are available

Non-estimated output tokens per end-to-end second, shown only from valid logs.

Statistics use UTC. Metrics without valid records display —. Request volume uses the configured public display scale.

Use the API

This example uses the unique route model ID. No provider header is needed.

Get an API key ↗

Base URL: https://api.ai526.com/v1 · /v1/images/generations

curl
curl https://api.ai526.com/v1/images/generations \
  -H 'Authorization: Bearer YOUR_AI526_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model":"gemini-3.1-flash-image-preview-xz","prompt":"A quiet mountain lake at sunrise, soft natural light","size":"1024x1024"}'

# API URL: use the URL above.
# YOUR_AI526_API_KEY: replace with your own platform key.
# model: use the copied unique ID, or a family ID for the lowest-priced route.
# prompt / messages: replace with your task.
# size: use a supported image size; fixed-size IDs require their own size.
python
import requests

response = requests.post(
    "https://api.ai526.com/v1/images/generations",
    headers={
    "Authorization": "Bearer YOUR_AI526_API_KEY",
    "Content-Type": "application/json"
},
    json={
    "model": "gemini-3.1-flash-image-preview-xz",
    "prompt": "A quiet mountain lake at sunrise, soft natural light",
    "size": "1024x1024"
},
)
response.raise_for_status()
print(response.json())

# API URL: use the URL above.
# YOUR_AI526_API_KEY: replace with your own platform key.
# model: use the copied unique ID, or a family ID for the lowest-priced route.
# prompt / messages: replace with your task.
# size: use a supported image size; fixed-size IDs require their own size.
javascript
const response = await fetch("https://api.ai526.com/v1/images/generations", {
  method: "POST",
  headers: {
  "Authorization": "Bearer YOUR_AI526_API_KEY",
  "Content-Type": "application/json"
},
  body: JSON.stringify({
  "model": "gemini-3.1-flash-image-preview-xz",
  "prompt": "A quiet mountain lake at sunrise, soft natural light",
  "size": "1024x1024"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());

// API URL: use the URL above.
// YOUR_AI526_API_KEY: replace with your own platform key.
// model: use the copied unique ID, or a family ID for the lowest-priced route.
// prompt / messages: replace with your task.
// size: use a supported image size; fixed-size IDs require their own size.

Anthropic Messages is a chat protocol and does not support image or video generation for this model. Use the media endpoint above.

Replace the placeholder key before calling. Media options depend on model support.

Try your own task

Prepare a request, then send it from the dashboard. This page makes no model calls.

Choose an image tier to see your per-image rate.

Calculated from size

Sending the request is billed at this model’s rate.

Request preview

JSON
{
  "model": "gemini-3.1-flash-image-preview-xz",
  "prompt": "A quiet mountain lake at sunrise, soft natural light",
  "size": "1024x1024"
}

This is a request preview. Results appear in the dashboard after a request completes.

Frequently asked questions

How should I choose a provider?

Start with automatic routing. To select a public provider, choose its code and copy the updated example. Retries remain within that provider.

How are performance metrics updated?

Metrics update from request records. Latency covers completed successful requests; metrics without valid records display —.

Can I use this model in another client?

The client must support the model’s protocol and a custom API URL. See tool integration guides ↗