nanobanana_compose_images
Combine multiple reference images to create new compositions, transfer styles between images, maintain character consistency, or merge objects from different sources using AI-powered image composition.
Instructions
Compose new images using multiple reference images with Nano Banana Pro.
Use up to 14 reference images to:
Create group compositions
Transfer styles between images
Maintain character consistency across scenes
Combine objects from different images
Limits:
Up to 6 images of objects for high-fidelity inclusion
Up to 5 images of humans for character consistency
Total maximum: 14 images
Args:
prompt (string, required): Description of how to compose the images
images (array, required): Array of image objects with:
base64 (string): Base64-encoded image data
mime_type (string): Image MIME type
model (string): Must be Nano Banana Pro (gemini-3-pro-image-preview)
aspect_ratio (string): Output aspect ratio
resolution (string): Output resolution (1K, 2K, 4K)
Returns:
success (boolean): Whether composition succeeded
imageData (string): Base64-encoded composed image
mimeType (string): Image MIME type
text (string): Any accompanying text
error (string): Error message if failed
Examples:
"Create a group photo of these 5 people at a beach"
"Apply the style of the first image to the subject in the second"
"Combine these product images into a catalog layout"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of how to compose/combine the images. Describe the desired scene, style transfer, or composition. | |
| images | Yes | Array of images to use as references. Up to 14 images total: 6 objects and 5 humans for character consistency. Each image needs base64 data and mime_type. | |
| model | No | Model to use. Multi-image composition requires Nano Banana Pro (gemini-3-pro-image-preview). | gemini-3-pro-image-preview |
| aspect_ratio | No | Aspect ratio of the generated image. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. Default: varies by prompt | |
| resolution | No | Resolution of the generated image (Nano Banana Pro only). Options: 1K, 2K, 4K. Note: Must use uppercase 'K'. Default: 1K |