메인 콘텐츠로 건너뛰기
POST
/
nano-banana
/
images
Nano Banana Images
curl --request POST \
  --url https://api.acedata.cloud/nano-banana/images \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "generate",
  "prompt": "a white siamese cat",
  "model": "nano-banana",
  "image_urls": [
    "<string>"
  ],
  "aspect_ratio": "1:1",
  "resolution": "1K",
  "callback_url": "<string>"
}
'
{
  "success": true,
  "task_id": "93f11baf-347b-4bb4-9520-8653cb46d6a3",
  "trace_id": "a9063166-26ed-4451-85b5-54e896817c69",
  "data": [
    {
      "prompt": "let this man wear on this T-shirt",
      "image_url": "https://platform.cdn.acedata.cloud/nanobanana/8e9e0253-26f4-45b9-b3f8-ac1aed1c284b.png"
    }
  ]
}

인증

Authorization
string
header
필수

헤더

accept
enum<string>

Specifies the format of the response from the server. If not specified, the default format is application/json.

사용 가능한 옵션:
application/json

본문

application/json
action
enum<string>
필수

The action to generate the images. If generate, the images will be generated from the prompt. If edit, the images will be edited from the prompt and the image_urls.

사용 가능한 옵션:
generate,
edit
예시:

"generate"

prompt
string
필수

The prompt which used to generate the images.

예시:

"a white siamese cat"

model
enum<string>

The model which used to generate the images. If not specified, the default model is nano-banana. nano-banana-2 is alias of gemini-3.1-flash-image (pro-level quality at flash speed), nano-banana-pro is alias of gemini-3-pro-image, nano-banana is alias of gemini-2.5-flash-image.

사용 가능한 옵션:
nano-banana,
nano-banana-2,
nano-banana-pro
image_urls
string[]

Link to the picture that needs to be edited. It can be a accessible http or https url or a base64 encoded image string like data:image/png;base64,iVBORw0KG... format. The image size should not exceed 10MB for each. If the action is edit, this parameter is required.

aspect_ratio
enum<string>

The aspect ratio of the generated images. Supported values are 1:1, 3:2, 2:3, 16:9, 9:16, 4:3, 3:4. Default is 1:1, this only works when action is generate. If action is edit, the aspect ratio will be determined by the first image in image_urls.

사용 가능한 옵션:
1:1,
3:2,
2:3,
16:9,
9:16,
4:3,
3:4
예시:

"1:1"

resolution
enum<string>

The resolution of the generated images. Supported values are 1K, 2K, 4K. Default is 1K, this only works when action is generate. If action is edit, the resolution will be determined by the first image in image_urls. And this only works when model is nano-banana-pro.

사용 가능한 옵션:
1K,
2K,
4K
callback_url
string

The callback URL which will be called when the images is generated, the URL should be accessible from the public internet. If specified, the response will be returned immediately and the result will be sent to the callback URL when it's ready.

응답

OK, the request is successful.

The response is of type object.