google/nano-banana
Google's famous original image generation and editing model.
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-bananaInput Schema
4 parameters · 1 required · 3 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | The text prompt to generate an image from. · Min length: 3 · Max length: 50000 · Default: "A high-resolution, studio-lit product photograph of a minimalist ceramic coffee mug in matte black, presented on a polished concrete surface. The lighting is a three-point softbox setup designed to create soft, diffused highlights and eliminate harsh shadows. The camera angle is a slightly elevated 45-degree shot to showcase its clean lines. Ultra-realistic, with sharp focus on the steam rising from the coffee. Square image." |
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 · Default: "1:1" 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",
"prompt": "A high-resolution, studio-lit product photograph of a minimalist ceramic coffee mug in matte black, presented on a polished concrete surface. The lighting is a three-point softbox setup designed to create soft, diffused highlights and eliminate harsh shadows. The camera angle is a slightly elevated 45-degree shot to showcase its clean lines. Ultra-realistic, with sharp focus on the steam rising from the coffee. Square image.",
"resolution": "1K",
"aspect_ratio": "1:1",
"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
Nano Banana is Google’s compact image creation workflow for turning natural-language direction into polished visual output. This route creates a new image from a prompt, covering photographic, illustrative, product, and graphic-design directions.
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. Use the supported canvas and resolution controls to prepare the image for its destination.
Highlights
- Natural-language image creation. Builds complete visual concepts from concise or detailed written briefs.
- 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.
- Flexible delivery. Offers multiple aspect ratios, resolutions, and common output encodings for production handoff.
Pricing
| Configuration | Billing unit | Price |
|---|---|---|
| Base generation | Per request | $0.04 |
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| The project needs creating a prompt-led image | 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": "A high-resolution, studio-lit product photograph of a minimalist ceramic coffee mug in matte black, presented on a polished concrete surface. The lighting is a three-point softbox setup designed to create soft, diffused highlights and eliminate harsh shadows. The camera angle is a slightly elevated 45-degree shot to showcase its clean lines. Ultra-realistic, with sharp focus on the steam rising from the coffee. Square image.",
"resolution": "1K",
"aspect_ratio": "21:9",
"output_format": "jpeg"
}
Technical Specs
| Spec | Value |
|---|---|
| Model ID | google/nano-banana |
| Input fields | 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 |
| Output fields | url, content_type |
| Execution | Asynchronous job |
Related Models
google/nano-banana/edit

