API token from https://platform.acedata.cloud
Specifies the format of the response from the server. If not specified, the default format is application/json.
application/json 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"
The prompt which used to generate the images.
"a white siamese cat"
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 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.
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"
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 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.