Images
Nano Banana
Google’s Nano Banana models make and edit pictures from text and up to 14 reference images, with crisp text in images and faithful edits.
The models
Make an image
import osfrom openai import OpenAIclient = OpenAI(base_url="https://api.zurelay.com/v1", api_key=os.environ["ZURELAY_API_KEY"])result = client.images.generate( model="nano-banana-pro", prompt="A minimalist poster for a jazz night: a brass saxophone in silhouette, the words 'Blue Hour' in tall serif letters, deep navy and gold", size="2K", extra_body={ "aspect_ratio": "2:3" },)print(result.data[0].url)Sizes: 1K, 2K or 4K, with any of ten aspect ratios (the full table is on Image generation). Without size, you get a 1K image.
Edit and combine with references
Pass up to 14 images in images (or as files on /v1/images/edits) and say what to do with them. Nano Banana keeps faces, products and logos recognizable across edits.
import osimport requestsresponse = requests.post( "https://api.zurelay.com/v1/images/generations", headers={"Authorization": f"Bearer {os.environ['ZURELAY_API_KEY']}"}, json={ "model": "nano-banana-pro", "prompt": "Studio product shot: the sneaker from the first image on the concrete block from the second, lit like the third image. Keep the sneaker's logo and colors exactly.", "images": [ "https://example.com/sneaker.png", "https://example.com/concrete.jpg", "https://example.com/lighting-ref.jpg" ], "size": "2K", "aspect_ratio": "1:1" },)response.raise_for_status()print(response.json())Prompting
Describe a scene, not keywords
Write the way you’d brief a photographer: subject, setting, composition, light, lens or medium, mood. “A weathered fisherman mending a net on a pier at dusk, low warm light, 50mm, shallow depth of field” beats “fisherman, pier, dusk, 4k, masterpiece”.
Text in images
Put the exact words in quotes and say where they go and how they look: “the headline ‘Grand Opening’ in bold white sans-serif across the top”. Keep each piece of text short.
Edits
- Name the change and what must stay: “Change only the wall color to sage green. Keep the furniture, light and camera angle.”
- Edit in steps for big changes: one call per change, feeding each result into the next.
- Refer to references by order and role: “the person from the first image, the outfit from the second”.
Shape and size
Pick the aspect ratio for where the image goes (9:16 for stories, 16:9 for headers, 4:5 for feeds). Draft at 1K, then make the keeper at 2K or 4K: the price is per image, by resolution.
Good to know
- Images take 10 to 60 seconds, longer at 4K. Set a client timeout of 10 minutes, which leaves room for a retry.
- Prompts the model declines return
image_not_generatedwith its reason, free of charge. - Every image carries the lab’s invisible SynthID watermark, as it does from Google.
- Links last 24 hours; your dashboard keeps images returned as links for 30 days.
Try it without code
Model details and examples: Nano Banana Pro, Nano Banana 2.
- Pricing: 1K and 2K $0.035, 4K $0.065 for Pro; 1K $0.025, 2K $0.034, 4K $0.058 for Nano Banana 2.
Questions, or something missing? Ask support in your dashboard or email support@zurelay.com.