Nano Banana AI image generation service offers functions such as image generation and image editing.
API home page: Ace Data Cloud - Nano Banana Image Generation
This document introduces the integration and usage of the Nano Banana Images API. This interface supports two capabilities: image generation (generate) and image editing (edit).
Before use, please enter the Nano Banana Images API on the Ace Data Cloud platform and click Acquire to apply for activation. The first application usually has free quotas available. Once activated, you can obtain the Bearer Token used to call the API from the platform.
- Base URL:
https://api.acedata.cloud - Endpoint:
POST /nano-banana/images - Authentication Method: Carry
authorization: Bearer {token}in the HTTP Header - Request Headers:
accept: application/jsoncontent-type: application/json
- Actions:
generate: Generate images based on text promptsedit: Edit based on given images
- Asynchronous Callback: Optional, receive task completion notifications and results via
callback_url
Minimum Required Parameters: action, prompt
When you only want to generate an image based on a prompt, set action to generate and provide a clear prompt.
curl -X POST 'https://api.acedata.cloud/nano-banana/images' \
-H 'authorization: Bearer {token}' \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-d '{
"action": "generate",
"prompt": "A photorealistic close-up portrait of an elderly Japanese ceramicist with deep, sun-etched wrinkles and a warm, knowing smile. He is carefully inspecting a freshly glazed tea bowl. The setting is his rustic, sun-drenched workshop. The scene is illuminated by soft, golden hour light streaming through a window, highlighting the fine texture of the clay. Captured with an 85mm portrait lens, resulting in a soft, blurred background (bokeh). The overall mood is serene and masterful. Vertical portrait orientation."
}'import requests
url = "https://api.acedata.cloud/nano-banana/images"
headers = {
"authorization": "Bearer {token}",
"accept": "application/json",
"content-type": "application/json",
}
payload = {
"action": "generate",
"prompt": (
"A photorealistic close-up portrait of an elderly Japanese ceramicist "
"with deep, sun-etched wrinkles and a warm, knowing smile. He is carefully "
"inspecting a freshly glazed tea bowl. The setting is his rustic, sun-drenched "
"workshop. The scene is illuminated by soft, golden hour light streaming through "
"a window, highlighting the fine texture of the clay. Captured with an 85mm "
"portrait lens, resulting in a soft, blurred background (bokeh). The overall mood "
"is serene and masterful. Vertical portrait orientation."
),
}
resp = requests.post(url, json=payload, headers=headers)
print(resp.json())For more info, please check below APIs and integration documents.
| API | Path | Integration Guidance |
|---|---|---|
| Nano Banana Images API | /nano-banana/images |
Nano Banana Images API Integration Guide |
| $t(document_title_nanobanana_tasks_api) | /nano-banana/tasks |
Nano Banana Tasks API Integration Guide |
Base URL: https://api.acedata.cloud
If you meet any issue, check our from support info.