Skip to main content
POST
/
vendors
/
google
/
v1
/
nano-banana
/
edit
Image to Image Edit
curl --request POST \
  --url https://api.mulerun.com/vendors/google/v1/nano-banana/edit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "make a photo of the man driving the car down the california coastline",
  "images": [
    "https://example.com/image.png",
    "https://example.com/image2.png"
  ],
  "aspect_ratio": "16:9"
}
'
{
  "task_info": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "status": "pending",
    "created_at": "2025-09-21T00:00:00.000Z",
    "updated_at": "2025-09-21T00:00:00.000Z"
  }
}
Edit images based on text prompts using the Gemini Nano-Banana model.

Aspect Ratio

The aspect_ratio parameter allows you to specify the desired aspect ratio for the edited image. Different aspect ratios are suitable for different use cases.

Supported Aspect Ratios and Resolutions

Aspect RatioResolution
1:11024×1024
2:3832×1248
3:21248×832
3:4864×1184
4:31184×864
4:5896×1152
5:41152×896
9:16768×1344
16:91344×768
21:91536×672
Note: The aspect_ratio parameter is optional. If not specified, the default aspect ratio will be used.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Image to image edit request body

prompt
string
required

Text prompt for image editing

images
string[]
required

List of images to edit. Supports both image URLs and base64-encoded images (minimum 1, maximum 10). Base64 encoded image data is like "data:image/png;base64,iVBORw0KGgoAAAA..."

Required array length: 1 - 10 elements
aspect_ratio
enum<string>
default:1:1

Aspect ratio of the edited image

Available options:
1:1,
2:3,
3:2,
3:4,
4:3,
4:5,
5:4,
9:16,
16:9,
21:9

Response

202 - application/json

Task created successfully

task_info
object