{ "model_id": "google/nano-banana", "provider_id": "google", "name": "Nano Banana", "description": "Google's fast image generation model producing high-quality images from text prompts.", "task": "Text-to-Image", "tags": [ "Image Generation", "Fast" ], "context_length": null, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "Input tokens (per 1M)": 0.3, "Output tokens (per 1M)": 30, "Cached input tokens (per 1M)": 0.03, "Cache creation tokens (per 1M)": 0.083333 }, "examples": [ { "name": "Cozy Coffee Shop", "description": "Interior scene with warm lighting and a cat", "input": { "prompt": "A cozy coffee shop interior with warm lighting, plants hanging from the ceiling, and a cat sleeping on a velvet armchair by the window", "aspect_ratio": "16:9" }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/cozy-coffee-shop.png" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/cozy-coffee-shop.png" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'google/nano-banana',\n {\n prompt:\n 'A cozy coffee shop interior with warm lighting, plants hanging from the ceiling, and a cat sleeping on a velvet armchair by the window',\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\",\n \"input\": {\n \"prompt\": \"A cozy coffee shop interior with warm lighting, plants hanging from the ceiling, and a cat sleeping on a velvet armchair by the window\",\n \"aspect_ratio\": \"16:9\"\n }\n}'" } ] }, { "name": "Vintage Tokyo Poster", "description": "Retro travel poster style illustration", "input": { "prompt": "A vintage travel poster for Tokyo, Japan in the style of 1960s airline advertisements, with Mount Fuji in the background and cherry blossoms framing the scene", "aspect_ratio": "9:16" }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/vintage-tokyo-poster.png" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/vintage-tokyo-poster.png" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'google/nano-banana',\n {\n prompt:\n 'A vintage travel poster for Tokyo, Japan in the style of 1960s airline advertisements, with Mount Fuji in the background and cherry blossoms framing the scene',\n aspect_ratio: '9:16',\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\",\n \"input\": {\n \"prompt\": \"A vintage travel poster for Tokyo, Japan in the style of 1960s airline advertisements, with Mount Fuji in the background and cherry blossoms framing the scene\",\n \"aspect_ratio\": \"9:16\"\n }\n}'" } ] }, { "name": "Dewdrops Macro", "description": "Photorealistic macro photography", "input": { "prompt": "A photorealistic macro shot of dewdrops on a spider web at sunrise, with rainbow light refracting through each droplet", "aspect_ratio": "1:1" }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/dewdrops-macro.png" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/dewdrops-macro.png" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'google/nano-banana',\n {\n prompt:\n 'A photorealistic macro shot of dewdrops on a spider web at sunrise, with rainbow light refracting through each droplet',\n aspect_ratio: '1:1',\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\",\n \"input\": {\n \"prompt\": \"A photorealistic macro shot of dewdrops on a spider web at sunrise, with rainbow light refracting through each droplet\",\n \"aspect_ratio\": \"1:1\"\n }\n}'" } ] }, { "name": "Pixel Art Marketplace", "description": "Isometric pixel art scene", "input": { "prompt": "An isometric pixel art scene of a bustling medieval marketplace with merchants, knights, and a dragon perched on the town hall roof", "aspect_ratio": "1:1" }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/pixel-art-marketplace.png" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/pixel-art-marketplace.png" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'google/nano-banana',\n {\n prompt:\n 'An isometric pixel art scene of a bustling medieval marketplace with merchants, knights, and a dragon perched on the town hall roof',\n aspect_ratio: '1:1',\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\",\n \"input\": {\n \"prompt\": \"An isometric pixel art scene of a bustling medieval marketplace with merchants, knights, and a dragon perched on the town hall roof\",\n \"aspect_ratio\": \"1:1\"\n }\n}'" } ] }, { "name": "High Resolution Landscape", "description": "Generate a high-resolution 4K landscape image", "input": { "prompt": "A dramatic mountain landscape at golden hour with snow-capped peaks and a crystal clear alpine lake", "aspect_ratio": "16:9", "image_size": "4K", "output_format": "png" }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/high-resolution-landscape.png" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana/high-resolution-landscape.png" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'google/nano-banana',\n {\n prompt:\n 'A dramatic mountain landscape at golden hour with snow-capped peaks and a crystal clear alpine lake',\n aspect_ratio: '16:9',\n image_size: '4K',\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\",\n \"input\": {\n \"prompt\": \"A dramatic mountain landscape at golden hour with snow-capped peaks and a crystal clear alpine lake\",\n \"aspect_ratio\": \"16:9\",\n \"image_size\": \"4K\",\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.png", "metadata": { "Output Format": "JPEG" }, "request_formats": null, "providers": null, "provider_details": [ { "id": "google-vertex-ai", "pricing": { "input_tokens": 0.3, "output_tokens": 30, "input_cached_tokens": 0.03, "input_cache_creation_tokens": 0.083333 } } ], "banner": null, "created_at": "2026-05-22 17:53:12", "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": [ "1:1", "3:2", "2:3", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9" ] }, "output_format": { "type": "string", "enum": [ "jpg", "png", "webp" ] }, "image_size": { "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 } } }