Nano Banana โ
Endpoint: POST https://mps.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.1). Output resolution ranges from 1K to 4K, and 3.1-lite suits speed-sensitive scenarios.
Basic Information โ
| Item | Value |
|---|---|
| ModelName | GEM |
| ModelVersion | 3.1 / 3.1-lite / 3.0 / 2.5 |
| Guardrail removal support | Not supported |
Specifications Supported by Version โ
| Version | Output Specification | Input and Conditions |
|---|---|---|
3.1 reference images | Supported specification: up to 14 images | โ |
resolution | Supported specification: 1K / 2K / 4K | โ |
aspect ratio | Supported specification: 1:1 / 16:9 / 9:16 / 4:3 / 3:4; for additional aspect ratios, see the details for each version | โ |
An editing-oriented generation engine that accepts multiple reference images. 3.1 supports up to 14 reference images.
Request Parameters โ
| Parameter | Required | Type | Description |
|---|---|---|---|
ModelName | Required | String | Fixed value GEM |
ModelVersion | Optional | String | 3.1 / 3.1-lite / 3.0 / 2.5 |
Prompt | Required | String | Generation prompt. Maximum 1000 characters |
EnhancePrompt | Optional | Boolean | Automatic prompt correction. Default value false |
ImageInfos.N | Optional | Array | Reference image array. Used for image-to-image and reference-based generation |
ExtraParameters | Optional | Object | Output options such as Resolution / AspectRatio |
AdditionalParameters | Optional | String | A JSON string containing model-specific options. For the seed delivery format, see Additional Configuration |
Request Example โ
json
{
"ModelName": "GEM",
"ModelVersion": "3.1",
"Prompt": "a young woman in traditional hanbok standing by a moonlit lake",
"EnhancePrompt": true,
"ExtraParameters": {
"Resolution": "1080P",
"AspectRatio": "16:9"
},
"Operator": "admin",
"StoreCosParam": {
"CosBucketName": "<bucket-appid>",
"CosBucketRegion": "<bucket-region>",
"CosBucketPath": "/aigc/"
}
}Reference Image Request โ
json
{
"ModelName": "GEM",
"ModelVersion": "3.1",
"Prompt": "Change the background to a quiet garden; preserve the subject.",
"EnhancePrompt": true,
"ExtraParameters": {
"Resolution": "1080P",
"AspectRatio": "16:9"
},
"Operator": "admin",
"StoreCosParam": {
"CosBucketName": "<bucket-appid>",
"CosBucketRegion": "<bucket-region>",
"CosBucketPath": "/aigc/"
},
"ImageInfos": [
{
"ImageUrl": "https://<host>/reference.jpg"
}
]
}Response Example โ
json
{
"Response": {
"Status": "DONE",
"Message": "ok",
"ImageUrls": [
"https://aigc-output-image-<id>.cos.<region>.myqcloud.com/<file>.png?q-sign-algorithm=sha1&..."
],
"RequestId": "<request-id>"
}
}