google/nano-banana/edit
Nano Banana Pro is Google's new state-of-the-art image generation and editing model
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/rungoogle/nano-banana/editInput Schema
5 parameters · 2 required · 3 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
images | string[] | Required | The URLs of the images to use for image-to-image generation or image editing. |
prompt | string | Required | The text prompt to generate an image from. · Min length: 3 · Max length: 50000 · Default: "Create a professional e-commerce fashion photo. Take the blue floral dress from the first image and let the woman from the second image wear it. Generate a realistic, full-body shot of the woman wearing the dress, with the lighting and shadows adjusted to match the outdoor environment." |
resolution | string | Optional | The resolution of the image to generate. · Options: 1K, 2K, 4K · Default: "1K" 1K2K4K |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
output_format | string | Optional | The format of the generated image. · Options: jpeg, png · Default: "png" jpegpng |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "google/nano-banana/edit",
"images": [
"https://ai.google.dev/static/gemini-api/docs/images/dress.png",
"https://ai.google.dev/static/gemini-api/docs/images/model.png"
],
"prompt": "Create a professional e-commerce fashion photo. Take the blue floral dress from the first image and let the woman from the second image wear it. Generate a realistic, full-body shot of the woman wearing the dress, with the lighting and shadows adjusted to match the outdoor environment.",
"resolution": "1K",
"output_format": "png"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Nano Banana Image Editing
Nano Banana Image Editing is Google’s compact image creation workflow for turning natural-language direction into polished visual output. This route edits a supplied image, making it useful when the existing subject or composition must remain recognizable while selected details change.
The model is especially approachable for conversational iteration: describe the scene or change in ordinary language, review the result, and refine the instruction with concrete details about subject, composition, lighting, style, color, and any text that must appear. Clearly separate the requested edit from the elements that should be preserved.
Highlights
- Conversational image editing. Transforms an existing visual through direct written instructions.
- Strong instruction following. Coordinates subject, setting, style, lighting, layout, and requested details across iterative prompts.
- Visual consistency. Maintains important identity and composition cues while refining or extending a creative direction.
- Targeted revisions. Supports localized changes without requiring the entire asset to be recreated.
Pricing
| Configuration | Billing unit | Price |
|---|---|---|
| Base generation | Per request | $0.15 |
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| The project needs revising an existing visual asset | The goal is a different media task or endpoint |
| The available inputs match the required local schema | Required source media or permissions are unavailable |
| The brief can specify subject, composition, style, and delivery | The result must be deterministic at pixel or sample level |
| The supported formats and controls match final placement | Delivery requires unsupported dimensions, codecs, or duration |
| An asynchronous generated result fits the workflow | A live, frame-synchronous, or real-time response is mandatory |
Prompt Guide
Write the request as a production brief: identify the main subject or source material, state the intended transformation, describe composition or timing, and finish with style, atmosphere, and delivery constraints. Keep preservation requirements separate from requested changes, and use only fields exposed by this route.
{
"prompt": "Create a professional e-commerce fashion photo. Take the blue floral dress from the first image and let the woman from the second image wear it. Generate a realistic, full-body shot of the woman wearing the dress, with the lighting and shadows adjusted to match the outdoor environment.",
"images": [
"https://example.com/reference.jpg"
],
"resolution": "1K",
"aspect_ratio": "21:9",
"output_format": "jpeg"
}
Technical Specs
| Spec | Value |
|---|---|
| Model ID | google/nano-banana/edit |
| Input fields | images (array)<br>prompt (string)<br>resolution (string; 1K, 2K, 4K)<br>aspect_ratio (string; 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16)<br>output_format (string; jpeg, png) |
| Required input | prompt, images |
| Output fields | url, content_type |
| Execution | Asynchronous job |
Related Models
google/nano-banana

