google/nano-banana-2-lite
Nano Banana 2 Lite by Google - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.
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-2-liteInput Schema
6 parameters · 1 required · 5 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | The text prompt to generate an image from. · Min length: 3 · Max length: 50000 |
seed | integer | Optional | The seed for the random number generator. |
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 |
system_prompt | string | Optional | Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). · Max length: 50000 · Default: "" |
thinking_level | string | Optional | When set, enables model thinking with the given level ('minimal' or 'high') and includes thoughts in the generation. Omit to disable. · Options: minimal, high minimalhigh |
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-2-lite",
"prompt": "An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater.",
"output_format": "png",
"system_prompt": ""
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Nano Banana 2 Lite
Nano Banana 2 Lite is a speed-first image generator for rapid ideation, interactive products, and high-volume visual pipelines. It retains reliable prompt adherence, character consistency, and legible in-image text while prioritizing low latency and cost efficiency.
This endpoint accepts a text prompt and produces one image. It is the Lite text-to-image route: it does not accept reference images, while optional thinking and system instructions can help shape more demanding generations.
Highlights
- Built for fast iteration. Designed for high-throughput, near-real-time workflows where teams need to draft, compare, and refine many visual directions quickly.
- Reliable instruction following. Preserves the requested subjects, scene details, and relationships across practical text-to-image prompts.
- Character consistency. Maintains recognizable character traits, making it useful for repeated concepts and coherent creative exploration.
- Legible visual text. Handles readable wording inside posters, labels, signs, and other designed imagery without turning the request into a separate editing workflow.
Pricing
| Unit | Price |
|---|---|
| Per request | $0.048375 |
When to Use
| Good fit | Consider alternatives |
|---|---|
| Rapid concept thumbnails and visual drafts | Editing an existing image, which needs an edit endpoint |
| High-volume campaign or catalog ideation | Maximum-detail professional artwork where speed is secondary |
| Interactive image experiences | Multi-image reference composition |
| Character-led concept exploration | Outputs above the endpoint's documented resolution controls |
| Posters, labels, and social graphics with text | Video, animation, or audio generation |
Prompt Guide
Describe the subject first, then lock composition, visible text, lighting, and style. Put any wording that must appear in quotation marks, and use concrete spatial directions instead of vague requests. Use thinking_level only when a more involved composition benefits from extra planning.
{
"prompt": "A friendly yellow robot barista behind a compact walnut coffee counter, three-quarter view, morning window light, teal ceramic cups arranged on the right. A clean menu board above the robot reads \"ROBOT ROAST\" in bold white sans-serif letters. Polished editorial illustration with consistent character details.",
"aspect_ratio": "16:9",
"output_format": "png",
"thinking_level": "minimal",
"system_prompt": "Keep the composition clean and preserve all quoted text exactly."
}
Technical Specs
| Spec | Value |
|---|---|
| Model ID | google/nano-banana-2-lite |
| Input | Required text prompt (3–50,000 characters) |
| Aspect ratios | 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 |
| Output format | PNG (default) or JPEG |
| Optional controls | Integer seed, system prompt, thinking level (minimal or high; omit to disable) |
| Output | One downloadable image URL |
| Execution | Async |
Related
- Nano Banana 2 — General-purpose sibling for a stronger quality and speed balance
- Nano Banana Lite Edit — Image editing with a lightweight Nano Banana route

