Skip to content

Nano Banana โ€‹

Updated

Endpoint: POST https://vod.intl.tencentcloudapi.comAction: CreateAigcImageTask

Nano Banana is an image generation model that supports text-to-image and multi-image reference generation / editing (up to 14 reference images on 3.6 / 3.1). Output resolution ranges from 1K to 4K. The latest version, 3.6 (Nano Banana 2.1), adds ultra-wide ratios such as 1:8 / 8:1, and 3.1-lite suits speed-sensitive scenarios.

Basic information โ€‹

ItemValue
ModelNameGEM
ModelVersion3.6 / 3.1 / 3.1-lite / 3.0 / 2.5
DefaultModelVersion=3.1 / AspectRatio=1:1
Guardrail bypass supportNot supported

Supported specs by version โ€‹

VersionModelMax reference imagesResolutionAspect ratio
3.6Nano Banana 2.114 (up to 4 character images)1K / 2K / 4K1:1 / 1:4 / 1:8 / 2:3 / 3:2 / 3:4 / 4:1 / 4:3 / 4:5 / 5:4 / 8:1 / 9:16 / 16:9 / 21:9
3.1Nano Banana 2141K / 2K / 4KSame as 3.6
3.1-liteNano Banana 2 Lite141K / 2K / 4KSame as 3.6
3.0Nano Banana Pro141K / 2K / 4K1:1 / 2:3 / 3:2 / 3:4 / 4:1 / 4:3 / 4:5 / 5:4 / 9:16 / 16:9 / 21:9
2.5Nano Banana31K / 2K / 4KSame as 3.0

All versions support text-to-image, reference-image generation, and image editing.

Request parameters โ€‹

ParameterRequiredTypeDescription
ModelNameRequiredStringFixed value GEM
ModelVersionOptionalString3.6 / 3.1 / 3.1-lite / 3.0 / 2.5
PromptRequiredStringThe generation prompt
FileInfos.NOptionalArrayReference image (image-to-image). Category is Image. See the table above for the image limit
OutputConfig.ResolutionOptionalString1K / 2K / 4K
OutputConfig.AspectRatioOptionalString1:1 / 16:9 / 9:16 / 4:3 / 3:4, and so on; see the table above for each version
OutputConfig.OutputImageCountOptionalIntegerNumber of images to generate (the upper limit differs by model)
ExtInfoOptionalStringExtension parameters. Set the thinking level with thinkingLevel: minimal / medium / high (default medium)

Request examples โ€‹

3.6 / Text to image โ€‹

json
{
  "SubAppId": 123456789,
  "ModelName": "GEM",
  "ModelVersion": "3.6",
  "Prompt": "an artist in a bunny costume copies the image on her monitor onto a canvas as an oil painting; the photo itself captures her painting this recursive image",
  "OutputConfig": {
    "StorageMode": "Temporary",
    "Resolution": "1K",
    "AspectRatio": "9:16"
  },
  "SessionContext": "gem36-t2i-001"
}

3.6 / Multi-image fusion โ€‹

json
{
  "SubAppId": 123456789,
  "ModelName": "GEM",
  "ModelVersion": "3.6",
  "FileInfos": [
    {
      "Type": "Url",
      "Category": "Image",
      "Url": "https://<host>/image-1.png"
    },
    {
      "Type": "Url",
      "Category": "Image",
      "Url": "https://<host>/image-2.png"
    }
  ],
  "Prompt": "Blend image 1 and image 2 into a single coherent scene.",
  "OutputConfig": {
    "StorageMode": "Temporary",
    "Resolution": "2K",
    "AspectRatio": "16:9"
  },
  "SessionContext": "gem36-i2i-001"
}

3.1 / Text to image โ€‹

json
{
  "SubAppId": 123456789,
  "ModelName": "GEM",
  "ModelVersion": "3.1",
  "Prompt": "a serene japanese garden, soft morning light",
  "OutputConfig": {
    "AspectRatio": "1:1",
    "OutputImageCount": 1,
    "StorageMode": "Temporary"
  },
  "SessionContext": "job-001"
}

Reference image request โ€‹

json
{
  "SubAppId": 123456789,
  "ModelName": "GEM",
  "ModelVersion": "3.1",
  "Prompt": "Change the background to a quiet garden; preserve the subject.",
  "OutputConfig": {
    "AspectRatio": "1:1",
    "OutputImageCount": 1,
    "StorageMode": "Temporary"
  },
  "SessionContext": "job-001",
  "FileInfos": [
    {
      "Type": "Url",
      "Category": "Image",
      "Url": "https://<host>/reference.jpg"
    }
  ]
}

Response example โ€‹

json
{
  "AigcImageTask": {
    "Status": "FINISH",
    "ErrCode": 0,
    "Progress": 100,
    "Output": {
      "FileInfos": [
        {
          "FileUrl": "http://<host>.vod2.myqcloud.com/.../aigcImageGenFile.png",
          "ExpireTime": "2026-08-01T10:29:48Z",
          "MetaData": {
            "Width": 1024,
            "Height": 1024,
            "Container": "png"
          }
        }
      ]
    }
  }
}

Special settings โ€‹

Additional options โ€‹

Google Gemini Image family

Supports text-to-image generation and reference-image generation (i2i).

Custom thinking level (thinkingLevel) โ€‹

Use ExtInfo.AdditionalParameters.thinkingLevel to control how much the model reasons before generating: minimal / medium / high, default medium. Higher levels follow composition and instructions more closely but take longer.

json
{
  "SubAppId": 123456789,
  "ModelName": "GEM",
  "ModelVersion": "3.6",
  "FileInfos": [
    {
      "Type": "Url",
      "Category": "Image",
      "Url": "https://<host>/reference.png"
    }
  ],
  "Prompt": "Turn this sketch into a detailed 16:9 storyboard with 8 panels.",
  "OutputConfig": {
    "StorageMode": "Temporary"
  },
  "ExtInfo": "{\"AdditionalParameters\": \"{\\\"thinkingLevel\\\":\\\"high\\\"}\"}",
  "SessionContext": "gem36-think-001"
}

ModelName accepts either GEM or GG

The integration guide lists the Nano Banana family's ModelName as GEM/GG; the two are equivalent. Examples on this page use GEM.

Built with VitePress ยท Deployed on Tencent EdgeOne Pages