Image Generation

Nano Banana

Image generation by Google. Supports up to 14 reference images, web grounding, text rendering, and output up to 4K.

SyncAll plans

Nano Banana 2

Best speed + quality, text rendering, up to 14 refs, web grounding

nano-banana-2

Nano Banana Pro

Best for text and multilingual content

nano-banana-pro

Generate

POST/api/v1/generate

Image generation is synchronous -- the response contains the output URL(s) immediately. No polling needed. Credits are deducted upfront and auto-refunded if generation fails.

Parameters

model
stringrequired
nano-banana-2 or nano-banana-pro
prompt
stringrequired
Text prompt describing the image. Supports @image1 through @image10 to reference attached images.
aspect_ratio
string
Nano Banana 2: 1:1 16:9 9:16 4:3 3:4 3:2 2:3 4:5 5:4 21:9 1:4 4:1 1:8 8:1
Default: 1:1
resolution
string
512 1K 2K 4K. Default: 1K. NB Pro defaults to 2K.
reference_images
string[]
Up to 10 public image URLs. Use @image1, @image2 in prompt. Upload via /api/v1/upload.
grounding
boolean
Enable web grounding via Google Search. Improves accuracy for real-world entities, logos, landmarks, recent events. Default: false
tag
string
Tag the output for reuse: character object style location. Tagged outputs appear in your library.

Reference Images

Attach up to 10 images as visual references. Use @image1, @image2, etc. in your prompt to direct each reference. All URLs must be publicly accessible -- use /api/v1/upload to host files.

Common use cases:

  • Character consistency -- keep the same character across multiple images
  • Style transfer -- match the visual style of a reference image
  • Product shots -- place a product (from ref) in different scenes
  • Edit / remix -- modify an existing image with a text prompt
  • Multi-subject -- combine elements from different references

Web Grounding

When grounding: true, the model uses Google Search to ground its knowledge in real-world data. This dramatically improves accuracy for:

  • Real people -- accurate likenesses of public figures
  • Logos & brands -- correct brand marks and colors
  • Landmarks -- accurate depictions of real places
  • Recent events -- knowledge beyond the model's training cutoff
  • Technical diagrams -- factually accurate illustrations
Web grounding adds a small per-request surcharge to the credit cost.

Examples

Basic image generation
curl -X POST https://www.lunostudio.ai/api/v1/generate \
  -H "Authorization: Bearer luno_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-2",
    "prompt": "A cozy coffee shop interior with warm lighting, watercolor style",
    "aspect_ratio": "16:9",
    "resolution": "2K"
  }'
Character consistency with refs
curl -X POST https://www.lunostudio.ai/api/v1/generate \
  -H "Authorization: Bearer luno_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-2",
    "prompt": "@image1 sitting at a desk working on a laptop, same outfit and hairstyle",
    "reference_images": ["https://storage.lunostudio.ai/.../character.jpg"],
    "resolution": "2K",
    "tag": "character"
  }'
Multi-ref composition
curl -X POST https://www.lunostudio.ai/api/v1/generate \
  -H "Authorization: Bearer luno_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-2",
    "prompt": "@image1 wearing the outfit from @image2, standing in the location from @image3",
    "reference_images": [
      "https://storage.lunostudio.ai/.../person.jpg",
      "https://storage.lunostudio.ai/.../outfit.jpg",
      "https://storage.lunostudio.ai/.../location.jpg"
    ]
  }'
Web grounding for real-world accuracy
curl -X POST https://www.lunostudio.ai/api/v1/generate \
  -H "Authorization: Bearer luno_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-2",
    "prompt": "The Eiffel Tower at sunset with cherry blossoms in the foreground, photorealistic",
    "grounding": true,
    "resolution": "4K",
    "aspect_ratio": "9:16"
  }'
Response (immediate)
{
  "output": ["https://storage.lunostudio.ai/generations/user/api-1716234567.png"],
  "credit_cost": 3,
  "model": "google/nano-banana-2",
  "type": "image"
}

Tagging Outputs

Pass tag to categorize the output for reuse in future generations:

characterA person or character to maintain consistency across generations
objectA product, item, or prop to place in different scenes
styleA visual style or aesthetic to apply to other prompts
locationA place or environment to reuse as a backdrop

Tagged outputs are saved to your library and visible in your dashboard at /requests.

Need help?

Engineering team responds within 5 minutes.