Google Nano Banana 2 Lite
Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image) is built for fast, cost-efficient 1K image generation and editing. Use it to sketch ideas, explore palettes and styles, or revise product images and everyday visuals with a reference image. Each submission returns a task ID. Use it to retrieve the image link when the task completes.
Pricing
The charge per call is (max(((120 * (float(Input tokens (tokens)) / 1000000)) + (14400 * ((float(Total tokens (tokens)) - float(Input tokens (tokens))) / 1000000))), 0)) AE credits. All applicable conditions are combined to calculate the total.
Input usage includes tokens for prompt text and reference images. Completion usage is total tokens minus input tokens and includes generated image, text, and thinking tokens. Charges depend on actual input and completion usage.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | 必填。用 contents 填写文字和参考图链接,用 generationConfig 设置图片尺寸、比例和返回内容。 | — |
request_body.contents | array | Yes | 填写一组生成或编辑图片的内容。 | — |
request_body.contents[].parts | array | Yes | 填写文字描述、参考图链接,或两者一起填写。每一项填一种内容。 | — |
request_body.contents[].parts[].text | string | Conditional | 填写要生成的画面或希望对参考图做的修改。 | — |
request_body.contents[].parts[].fileData | object | Conditional | 填写参考图链接,可同时填写图片的媒体类型。 | — |
request_body.contents[].parts[].fileData.fileUri | string | Yes | 填写可访问的 HTTPS 图片链接。 | — |
request_body.contents[].parts[].fileData.mimeType | enum (image/jpeg | image/png | image/webp) | No | 可省略。填写时使用图片实际类型,支持 image/jpeg、image/png 或 image/webp。 | — |
request_body.generationConfig | object | No | 可选。设置图片尺寸、宽高比和返回内容类型。 | — |
request_body.generationConfig.imageConfig | object | No | 可选。设置图片尺寸和宽高比。 | — |
request_body.generationConfig.imageConfig.imageSize | enum (1K) | No | 输出图片尺寸。支持 1K。 | — |
request_body.generationConfig.imageConfig.aspectRatio | enum (1:1 | 2:3 | 3:2 | 3:4 | 4:3 | 4:5 | 5:4 | 9:16 | 16:9 | 21:9) | No | 输出图片的宽高比,如 1:1 或 16:9。 | — |
request_body.generationConfig.responseModalities | array | No | 可省略。只要图片时填 ["IMAGE"],同时需要图片和文字时填 ["IMAGE", "TEXT"]。 | — |
Invocation example
Parameter templateGenerated from the parameter configuration. Replace the sample values before use.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_nano_banana_2_lite' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"contents": [
{
"parts": [
{
"text": "xxx"
}
]
}
]
}
}
}'No response example available yet.




