Image to Image Edit
curl --request POST \
--url https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/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": "5:4",
"resolution": "2K"
}
'import requests
url = "https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit"
payload = {
"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": "5:4",
"resolution": "2K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: '5:4',
resolution: '2K'
})
};
fetch('https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => '5:4',
'resolution' => '2K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit"
payload := strings.NewReader("{\n \"prompt\": \"make a photo of the man driving the car down the california coastline\",\n \"images\": [\n \"https://example.com/image.png\",\n \"https://example.com/image2.png\"\n ],\n \"aspect_ratio\": \"5:4\",\n \"resolution\": \"2K\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"make a photo of the man driving the car down the california coastline\",\n \"images\": [\n \"https://example.com/image.png\",\n \"https://example.com/image2.png\"\n ],\n \"aspect_ratio\": \"5:4\",\n \"resolution\": \"2K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"make a photo of the man driving the car down the california coastline\",\n \"images\": [\n \"https://example.com/image.png\",\n \"https://example.com/image2.png\"\n ],\n \"aspect_ratio\": \"5:4\",\n \"resolution\": \"2K\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}Nano Banana Pro
π Nano Banana Pro Image Edit
Edit images based on text prompts using Gemini Nano-Banana Pro model
POST
/
vendors
/
google
/
v1
/
nano-banana-pro
/
edit
Image to Image Edit
curl --request POST \
--url https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/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": "5:4",
"resolution": "2K"
}
'import requests
url = "https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit"
payload = {
"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": "5:4",
"resolution": "2K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: '5:4',
resolution: '2K'
})
};
fetch('https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => '5:4',
'resolution' => '2K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit"
payload := strings.NewReader("{\n \"prompt\": \"make a photo of the man driving the car down the california coastline\",\n \"images\": [\n \"https://example.com/image.png\",\n \"https://example.com/image2.png\"\n ],\n \"aspect_ratio\": \"5:4\",\n \"resolution\": \"2K\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"make a photo of the man driving the car down the california coastline\",\n \"images\": [\n \"https://example.com/image.png\",\n \"https://example.com/image2.png\"\n ],\n \"aspect_ratio\": \"5:4\",\n \"resolution\": \"2K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/google/v1/nano-banana-pro/edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"make a photo of the man driving the car down the california coastline\",\n \"images\": [\n \"https://example.com/image.png\",\n \"https://example.com/image2.png\"\n ],\n \"aspect_ratio\": \"5:4\",\n \"resolution\": \"2K\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}Overview
Nano Banana Pro can restyle or surgically modify a reference image while maintaining global composition. Provide one or more images plus a short instructionβProβs upgraded diffusion backbone keeps lighting, textures, and edge fidelity intact.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Image to image edit request body
Text prompt for image editing
List of images to edit. Supports both image URLs and base64-encoded images (minimum 1, maximum 14). Base64 encoded image data is like "data:image/png;base64,iVBORw0KGgoAAAA..."
Required array length:
1 - 14 elementsAspect 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 Output resolution preset (longest side in pixels)
Available options:
1K, 2K Response
202 - application/json
Task created successfully
Show child attributes
Show child attributes

