gemini-3.1-flash-image
Google gemini-3.1-flash-image
Use gemini-3.1-flash-image with the compatible FoxRouter API below. Prices and groups are synced from foxrouter.org/pricing when the documentation is built; account groups and availability are shown in the console.
#Pricing
List price
- Per request
- ¥0.055 / request
Price by groupUnit: ¥ / request, list price × group multiplier
| Group | Per request |
|---|---|
| default分组×1默认分组 | ¥0.055 |
| 绘图&视频分组×1有绘图或视频需求选这个分组 | ¥0.055 |
Prices and groups synced at 2026-10-30.
#Image generation
POST
https://foxrouter.org/v1/images/generations#Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | — | Text prompt describing the desired image generation or edit. |
aspect_ratio | string | No | "1:1" | Aspect ratio of the output image. |
image_size | string | No | "1K" | Output resolution tier or preset alias, e.g. 1K, 2K, 4K, square_hd. |
image_urls | array | No | — | Reference images for generation or multi-image editing, one per line, maximum 6. |
previous_request_id | string | No | — | request_id (it_...) of the immediately preceding image generation/edit owned by the same API key, enabling multi-turn editing. |
seed | integer | No | — | Random seed for reproducible generation. |
#Request example
bash
curl -X POST "https://foxrouter.org/v1/images/generations" \
-H "Authorization: Bearer $FOXROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-image",
"prompt": "A minimalist product poster of a ceramic vase, soft studio light.",
"aspect_ratio": "1:1",
"image_size": "1K"
}'#Try it online
Result links
Raw JSON