Skip to main content

Overview

nanobanana is a fast, efficient image generation model for general use cases.
  • Type: Image Generation
  • Processing: Synchronous
  • Resolution: Up to 2048x2048
  • Price: $0.016 per image

Parameters

model
string
required
nanobanana
prompt
string
required
Description of the image to generate (max 2000 characters)
negative_prompt
string
What to avoid in the image (max 1000 characters)
width
integer
Image width in pixels (256-2048, default: 1024)
height
integer
Image height in pixels (256-2048, default: 1024)
num_outputs
integer
Number of images to generate (1-4, default: 1)
orientation
string
Image orientation: portrait or landscape

Example

curl -X POST https://api.eggapi.ai/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nanobanana",
    "prompt": "A futuristic cityscape at sunset",
    "width": 1024,
    "height": 1024,
    "num_outputs": 1
  }'

Response

{
  "data": {
    "id": "gen_abc123def456",
    "model": "nanobanana",
    "urls": ["https://cdn.eggapi.ai/outputs/abc123.png"],
    "cost": "$0.0160"
  },
  "error": null
}