Inputlive schema
Sign in to run this model with your own API key. Sign in →
gemini-3.1-flash-lite-image
Sign in to run this model with your own API key. Sign in →
Run the form on the left. Results, polling status and cURL appear under the form.
This model is priced by the usage dimensions listed here. Compare all pricing.
List prices in USD. Your effective price also depends on the billing group attached to your API key.
gemini-3.1-flash-lite-imagegemini-3.1-flash-lite-imagegemini-3.1-flash-lite-image/v1beta/models/gemini-3.1-flash-lite-image:generateContentconst BASE_URL = "https://api.dreamtoai.com";
const API_KEY = process.env.MIX_API_KEY;
const headers = {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
const payload = {
"model": "gemini-3.1-flash-lite-image",
"input": {
"prompt": "生成一张产品海报,白色背景,商业摄影风格",
"image_url": "https://example.com/input.png",
"reference_image_urls": [
"https://example.com/reference.png"
],
"reference_images": [
"https://example.com/reference.png"
],
"mask": "https://example.com/mask.png",
"size": "2752x1536",
"quality": "medium",
"output_format": "png",
"response_format": "url",
"background": "auto",
"n": 1,
"user": "user-123",
"style": "Describe the output you want",
"aspect_ratio": "1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9"
}
};
const submit = await fetch(`${BASE_URL}/v1/jobs`, {
method: "POST",
headers,
body: JSON.stringify(payload),
}).then((r) => r.json());
const status = await fetch(`${BASE_URL}/v1/jobs/${submit.id}`, { headers })
.then((r) => r.json());
console.log(status);
Create a key in Console → API Keys and replace the placeholder in the sample.
README
gemini-3.1-flash-lite-image
| Parameter | Required | Description |
|---|---|---|
promptstring | Required | Text description of what to generate. |
image_urlimage | Optional | Reference image to guide the result. |
reference_image_urlsarray | Optional | Reference images to guide the result. |
reference_imagesarray | Optional | 参考图 |
maskimage | Optional | 遮罩图 |
sizestring | Optional | Output image size. |
qualityenum | Optional | Output quality level. Options: auto, low, medium, high. Default: auto. |
output_formatenum | Optional | 输出格式 Options: png, jpeg, webp. |
response_formatenum | Optional | Format of the returned result, such as a URL or base64 data. Options: base64, url. |
backgroundenum | Optional | 背景 Options: auto, transparent, opaque. |
ninteger | Optional | Number of outputs to generate. |
userstring | Optional | 终端用户标识 |
stylestring | Optional | 风格 |
aspect_ratiostring | Optional | Output aspect ratio. Default: 1:1. |
The model reads a prompt like a creative brief. Name the subject first, then add the details that matter.
Who or what is in the image, and what it is doing.
Photo, 3D render, watercolor or flat illustration. For photographic looks, name a lens or film stock.
Framing and viewpoint: close-up, wide shot, overhead, centered, rule of thirds.
Golden hour, soft studio light, neon, a pastel palette, high contrast.
Put the exact words in quotes and say where they go.
A poster with the headline "OPEN LATE" in bold white letters across the top.
| Prompt | |
|---|---|
| Weak | a coffee shop |
| Strong | A cozy corner coffee shop on a rainy evening, seen through the front window. Warm tungsten light inside, a barista pouring latte art, condensation on the glass, street reflections. 35mm photo, shallow depth of field, muted teal and amber palette. |
| Billing item | Price | Official price |
|---|---|---|
| prompt_tokens | $0.10 per 1M | |
| completion_tokens | $12.00 per 1M | |
| thoughts_tokens | $0.60 per 1M |
That is 60% below the official list price.
Example: a request with 10,000 input tokens and 1,000 output tokens costs about $0.01.
List prices in USD. Your effective price also depends on the billing group attached to your API key. Compare all pricing
gemini-3-1-flash-imagenano-banana-2nano-banana-proveo-3-1Browse all image modelsBrowse API Market
gemini-3.1-flash-lite-image
Send POST /v1beta/models/gemini-3.1-flash-lite-image:generateContent with the model ID gemini-3.1-flash-lite-image and your API key. Ready-to-run samples are in the API section above.
Requests are billed at the prices listed above and charged to your wallet. Final cost depends on usage and the billing group attached to your API key.
Create one in Console → API Keys. The same key works for every model on the gateway.
Yes. You can use what you generate in commercial projects, subject to the model provider’s terms.
gemini-3.1-flash-lite-image