Google Nano Banana 2 Lite

Usage-based pricing
ae_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.

Image
Usage-based pricing

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.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYes必填。用 contents 填写文字和参考图链接,用 generationConfig 设置图片尺寸、比例和返回内容。—
request_body.contentsarrayYes填写一组生成或编辑图片的内容。—
request_body.contents[].partsarrayYes填写文字描述、参考图链接,或两者一起填写。每一项填一种内容。—
request_body.contents[].parts[].textstringConditional填写要生成的画面或希望对参考图做的修改。—
request_body.contents[].parts[].fileDataobjectConditional填写参考图链接,可同时填写图片的媒体类型。—
request_body.contents[].parts[].fileData.fileUristringYes填写可访问的 HTTPS 图片链接。—
request_body.contents[].parts[].fileData.mimeTypeenum (image/jpeg | image/png | image/webp)No可省略。填写时使用图片实际类型,支持 image/jpeg、image/png 或 image/webp。—
request_body.generationConfigobjectNo可选。设置图片尺寸、宽高比和返回内容类型。—
request_body.generationConfig.imageConfigobjectNo可选。设置图片尺寸和宽高比。—
request_body.generationConfig.imageConfig.imageSizeenum (1K)No输出图片尺寸。支持 1K。—
request_body.generationConfig.imageConfig.aspectRatioenum (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.responseModalitiesarrayNo可省略。只要图片时填 ["IMAGE"],同时需要图片和文字时填 ["IMAGE", "TEXT"]。—

Invocation example

Parameter template

Generated from the parameter configuration. Replace the sample values before use.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --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.