Create Nano Banana 2 — Edit
curl --request POST \
--url https://api.apisale.ai/v1/run/google/nano-banana-2/edit \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"prompt": "make a photo of the man driving the car down the california coastline",
"num_images": 1,
"resolution": "1K",
"aspect_ratio": "16:9",
"output_format": "png",
"safety_tolerance": "4"
}
}
'import requests
url = "https://api.apisale.ai/v1/run/google/nano-banana-2/edit"
payload = { "input": {
"prompt": "make a photo of the man driving the car down the california coastline",
"num_images": 1,
"resolution": "1K",
"aspect_ratio": "16:9",
"output_format": "png",
"safety_tolerance": "4"
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: {
prompt: 'make a photo of the man driving the car down the california coastline',
num_images: 1,
resolution: '1K',
aspect_ratio: '16:9',
output_format: 'png',
safety_tolerance: '4'
}
})
};
fetch('https://api.apisale.ai/v1/run/google/nano-banana-2/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"run_id": "<string>",
"endpoint": "<string>",
"model": "<string>",
"capability": "<string>",
"mode": "<string>",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"output": {},
"error": {
"type": "<string>",
"code": 123,
"message": "<string>"
},
"billing": {
"amount": "<string>",
"currency": "usd"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"elapsed_ms": 123
}Google
Nano Banana 2 — Edit
Nano Banana 2 (Gemini 3.x Flash Image) with resolution tiers. Optimized for image to image via apisale.
POST
/
v1
/
run
/
google
/
nano-banana-2
/
edit
Create Nano Banana 2 — Edit
curl --request POST \
--url https://api.apisale.ai/v1/run/google/nano-banana-2/edit \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"prompt": "make a photo of the man driving the car down the california coastline",
"num_images": 1,
"resolution": "1K",
"aspect_ratio": "16:9",
"output_format": "png",
"safety_tolerance": "4"
}
}
'import requests
url = "https://api.apisale.ai/v1/run/google/nano-banana-2/edit"
payload = { "input": {
"prompt": "make a photo of the man driving the car down the california coastline",
"num_images": 1,
"resolution": "1K",
"aspect_ratio": "16:9",
"output_format": "png",
"safety_tolerance": "4"
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: {
prompt: 'make a photo of the man driving the car down the california coastline',
num_images: 1,
resolution: '1K',
aspect_ratio: '16:9',
output_format: 'png',
safety_tolerance: '4'
}
})
};
fetch('https://api.apisale.ai/v1/run/google/nano-banana-2/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"run_id": "<string>",
"endpoint": "<string>",
"model": "<string>",
"capability": "<string>",
"mode": "<string>",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"output": {},
"error": {
"type": "<string>",
"code": 123,
"message": "<string>"
},
"billing": {
"amount": "<string>",
"currency": "usd"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"elapsed_ms": 123
}Overview
Nano Banana 2 (Gemini 3.x Flash Image) with resolution tiers. Optimized for image to image via apisale.Docs = API contract + Try it (snapshot). Explore = browser playground. Model page = product examples.
Endpoint
POST https://api.apisale.ai/v1/run/google/nano-banana-2/edit
| Model slug | google/nano-banana-2/edit |
| Category | Image To Image (image-to-image) |
| Lab | |
| Mode | async |
Pricing
From $0.032/image apisale price is 30% below the vendor’s official list price.| Tier | Unit | Official price | apisale price |
|---|---|---|---|
| 0.5K | image | $0.045 | $0.032 |
| 1K | image | $0.067 | $0.047 |
| 2K | image | $0.101 | $0.071 |
| 4K | image | $0.151 | $0.106 |
Official price = vendor list price. apisale price = what you pay through apisale.
Volume tiers
0.5K — 5000+→0.024 1K — 5000+→0.035 2K — 5000+→0.053 4K — 5000+→0.079Request
{
"input": {
"prompt": "make a photo of the man driving the car down the california coastline",
"num_images": 1,
"resolution": "1K",
"aspect_ratio": "16:9",
"output_format": "png",
"safety_tolerance": "4"
}
}
Parameters
Fields marked * are required. UseAuthorization: Key YOUR_API_KEY for REST.
number
Optional random seed for reproducibility.
string
required
Text prompt describing the image. Maximum 10000 characters.
array
required
Input image URLs for editing (1-14 images).
number
Number of images to generate (1-4). Default:
1 Range: 1 – 4string
Default:
1K Values: 0.5K, 1K, 2K, 4Kstring
Default:
auto Values: auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 4:1, 1:4, 8:1, 1:8string
Default:
png Values: jpeg, png, webpstring
Default:
4 Values: 1, 2, 3, 4, 5, 6string
Optional HTTPS webhook when the run reaches a terminal state.
boolean
Block until completion (same Run response shape).
Input schema
Input schema
{
"params": {
"seed": {
"type": "int",
"description": "Optional random seed for reproducibility."
},
"prompt": {
"type": "string",
"required": true,
"max_length": 10000,
"description": "Text prompt describing the image. Maximum 10000 characters."
},
"image_urls": {
"type": "array<media>",
"required": true,
"max_items": 14,
"min_items": 1,
"description": "Input image URLs for editing (1-14 images)."
},
"num_images": {
"max": 4,
"min": 1,
"type": "int",
"default": 1,
"description": "Number of images to generate (1-4)."
},
"resolution": {
"type": "enum",
"values": [
"0.5K",
"1K",
"2K",
"4K"
],
"default": "1K"
},
"aspect_ratio": {
"type": "enum",
"values": [
"auto",
"21:9",
"16:9",
"3:2",
"4:3",
"5:4",
"1:1",
"4:5",
"3:4",
"2:3",
"9:16",
"4:1",
"1:4",
"8:1",
"1:8"
],
"default": "auto"
},
"output_format": {
"type": "enum",
"values": [
"jpeg",
"png",
"webp"
],
"default": "png"
},
"safety_tolerance": {
"type": "enum",
"values": [
"1",
"2",
"3",
"4",
"5",
"6"
],
"default": "4"
}
}
}
Submit response
Returns a Run withrun_id. Poll with GET /v1/runs/{run_id} or use Try it above.
string
required
Unique run ID — save for polling and webhooks.
string
required
queued (async) or terminal state for sync runs.object
Result when
status is succeeded — see Output schema below.Example (async submit)
{
"run_id": "run_550e8400-e29b-41d4-a716-446655440000",
"endpoint": "google/nano-banana-2/edit",
"model": "edit",
"capability": "image",
"mode": "image-to-image",
"status": "queued",
"output": null,
"error": null,
"billing": null,
"created_at": "2026-06-27T12:00:00.000Z",
"started_at": null,
"completed_at": null,
"elapsed_ms": null
}
Output
Whenstatus is succeeded, output follows this schema:
Output schema
Output schema
{
"type": "object",
"example": {
"images": [
{
"url": "https://cdn.mountsea.ai/tasks/ms-example/0.png",
"mime": "image/png"
}
]
},
"required": [
"images"
],
"properties": {
"images": {
"type": "array",
"items": {
"type": "object",
"properties": {
"b64": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"mime": {
"type": "string"
}
}
}
}
},
"description": "Succeeded task output: normalized images."
}
Example
curl -X POST "https://api.apisale.ai/v1/run/google/nano-banana-2/edit" \
-H "Authorization: Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "make a photo of the man driving the car down the california coastline",
"num_images": 1,
"resolution": "1K",
"aspect_ratio": "16:9",
"output_format": "png",
"safety_tolerance": "4"
}
}'
Related
Authorizations
Key sk-... (native REST) or Bearer sk-... (vendor SDKs)
Body
application/json
Response
201 - application/json
Run accepted
Unique run identifier
Model slug
Available options:
queued, processing, succeeded, failed, timeout, cancelled Show child attributes
Show child attributes
Show child attributes
Show child attributes
