Nano Banana Editor API
A powerful AI editor for complex image manipulation, blending multiple reference images, and creative composition.
POST/api/image/nano-banana-editor
Edit or generate images using multiple references and prompts.
Request Body
| Field | Type | Description |
|---|---|---|
| images | Array of Objects | Required. List of reference images. Each object should have `url` or `dataUrl`, and optional `label` or `prompt`. |
| prompt | string | Required. Main instruction for the edit. |
| referenceImage | string | Optional. A distinct style reference image. |
| model | string | Optional. `'standard'` (default) or `'pro'`. |
| aspectRatio | string | Optional. Default `'1:1'`. |
| outputResult | string | Optional. `'base64'` (default) or `'url'`. |
Example Request
curl -X POST 'https://codingmantra.com/api/image/nano-banana-editor' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"images": [
{ "url": "https://example.com/tiger.jpg", "label": "main subject" },
{ "url": "https://example.com/galaxy.jpg", "label": "background texture" }
],
"prompt": "Create a surreal image of a tiger made of galaxy stars.",
"aspectRatio": "16:9"
}'Example Response
{
"data": {
"photoDataUri": "data:image/png;base64,..."
}
}