Skip to content
Main Site News Console

Nano Banana Images

Nano Banana is Gemini’s image generation series, specializing in photorealistic portraits, product shots, and creative composites, and in 4ALL API it uses the same interface as other image models.

Text-to-Image

Terminal window
curl https://api.4allapi.com/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AIPROXY_KEY" \
-d '{
"model": "nano-banana-2",
"prompt": "A shiba inu wearing an astronaut helmet, studio-quality lighting, shallow depth of field",
"size": "1024x1024"
}'

Image-to-Image (Reference Image)

Use /v1/images/edits to upload a reference image, suitable for scenarios where you want to keep the same person/product consistent:

Terminal window
curl https://api.4allapi.com/v1/images/edits \
-H "Authorization: Bearer $AIPROXY_KEY" \
-F model="nano-banana-2" \
-F image="@ref.png" \
-F prompt="The same person, changed to a full-body shot in a winter snowy scene"

Prompting Tips

  • Describe using the structure of “subject + scene + style + lighting/texture”; Chinese or English both work;
  • If you want text to appear accurately in the image, write the text content in quotation marks;
  • For multi-reference-image scenarios (character consistency), it is recommended to fix one main reference image and then fine-tune the prompt gradually;
  • For specific available variants (Pro / Standard / Lite and resolution variants), refer to the Model Marketplace.