Nano Banana API

Model-specific Buble API parameters, modes, pricing, and examples for Nano Banana.

Nano Banana API

Nano Banana is suited for fast image generation and practical image-to-image transformations.

Model keys

  • google/nano-banana — Nano Banana

Supported modes and inputs

ModelModeLabelInput requirements
google/nano-bananatext_to_imageText to ImagePrompt max 5000 chars
google/nano-bananaimage_to_imageImage to ImagePrompt max 5000 chars
Images reference: 1-10 files, 30 MB, formats jpg, png, webp, bmp, gif

Options

ModelOptionDefaultAllowed valuesApplies to
google/nano-bananaoutput_formatpngpng, jpegAll modes
google/nano-bananaaspect_ratio1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, 21:9, autoAll modes

Pricing

ModelPricing
google/nano-banana1 credit per image

Production guidance

  • Pass mode explicitly.
  • Use only option values listed above.
  • Upload media with POST /api/v1/files before calling media-input modes.
  • Use the exact model key for the variant you want.

Example: text to image

curl https://buble.ai/api/v1/generations \
  -H "Authorization: Bearer $BUBLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/nano-banana",
    "mode": "text_to_image",
    "prompt": "A premium editorial product image of a minimalist ceramic coffee grinder on a warm walnut counter, soft studio lighting",
    "aspect_ratio": "1:1",
    "output_format": "png"
  }'

Example: image to image

Upload an image first, then pass the returned URL to image_urls.

curl https://buble.ai/api/v1/generations \
  -H "Authorization: Bearer $BUBLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/nano-banana",
    "mode": "image_to_image",
    "prompt": "Transform the source into a clean commercial product image while preserving the main object",
    "image_urls": ["https://example.com/source.png"],
    "aspect_ratio": "1:1",
    "output_format": "png"
  }'