{ "model_id": "google/nano-banana-2-lite", "provider_id": "google", "name": "Nano Banana 2 Lite", "description": "Google's fastest Gemini image generation model for rapid image creation and iteration.", "task": "Text-to-Image", "tags": [ "Image Generation", "Fast", "Image Editing" ], "context_length": 65536, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "Input tokens (per 1M)": 0.25, "Output tokens (per 1M)": 30 }, "examples": [ { "name": "Concept Sketch", "description": "Generate a fast concept illustration", "input": { "prompt": "A playful concept sketch of a compact solar-powered delivery robot rolling through a leafy neighborhood, bright morning light, clean product design", "aspect_ratio": "16:9" }, "output": { "image": "https://examples.aig.cloudflare.com/google/nano-banana-2-lite/concept-sketch.jpg" }, "raw_response": { "state": "Completed", "result": { "image": "https://examples.aig.cloudflare.com/google/nano-banana-2-lite/concept-sketch.jpg" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'google/nano-banana-2-lite',\n {\n prompt:\n 'A playful concept sketch of a compact solar-powered delivery robot rolling through a leafy neighborhood, bright morning light, clean product design',\n aspect_ratio: '16:9',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"google/nano-banana-2-lite\",\n \"input\": {\n \"prompt\": \"A playful concept sketch of a compact solar-powered delivery robot rolling through a leafy neighborhood, bright morning light, clean product design\",\n \"aspect_ratio\": \"16:9\"\n }\n}'" } ] }, { "name": "Product Render", "description": "Create a square PNG product image", "input": { "prompt": "A studio product render of translucent wireless earbuds in a frosted glass charging case, soft gradient background, premium advertising style", "aspect_ratio": "1:1", "output_format": "png" }, "output": { "image": "https://examples.aig.cloudflare.com/google/nano-banana-2-lite/product-render.png" }, "raw_response": { "state": "Completed", "result": { "image": "https://examples.aig.cloudflare.com/google/nano-banana-2-lite/product-render.png" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'google/nano-banana-2-lite',\n {\n prompt:\n 'A studio product render of translucent wireless earbuds in a frosted glass charging case, soft gradient background, premium advertising style',\n aspect_ratio: '1:1',\n output_format: 'png',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"google/nano-banana-2-lite\",\n \"input\": {\n \"prompt\": \"A studio product render of translucent wireless earbuds in a frosted glass charging case, soft gradient background, premium advertising style\",\n \"aspect_ratio\": \"1:1\",\n \"output_format\": \"png\"\n }\n}'" } ] } ], "default_example": null, "code_snippets": [], "supports_async": false, "zdr": true, "zdr_comment": null, "external_info": "https://deepmind.google/technologies/imagen/", "terms": "https://ai.google.dev/gemini-api/terms", "cover_image_url": "https://pub-26f1392c1b674324be6786695bd72257.r2.dev/google/nano-banana-2-lite.png", "metadata": { "Input Size Limit": "500 MB", "Output Format": "JPEG or PNG" }, "request_formats": null, "providers": null, "provider_details": [ { "id": "google-vertex-ai", "pricing": { "input_tokens": 0.25, "output_tokens": 30 } } ], "banner": null, "created_at": "2026-07-01 20:21:36", "schema": { "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "prompt": { "type": "string" }, "image_input": { "maxItems": 3, "type": "array", "items": { "type": "string" } }, "aspect_ratio": { "type": "string", "enum": [ "match_input_image", "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9" ] }, "output_format": { "type": "string", "enum": [ "jpg", "png" ] }, "resolution": { "type": "string", "enum": [ "1K", "2K", "4K" ] } }, "required": [ "prompt" ], "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string", "format": "uri" } }, "required": [ "image" ], "additionalProperties": false } } }