by @eng0ai
Generate images from text prompts using Google Nano Banana (Gemini image generation) via eng0 data API. Use when user asks to generate, create, or make images, pictures, illustrations, or artwork from descriptions. Triggers include "generate image", "create image", "make a picture", "draw", "illustrate", "image of", "picture of", "nano banana". Do NOT use for image editing or manipulation of existing images.
Generate images from text prompts using Google Nano Banana (Gemini's native image generation).
https://api.eng0.ai/api/data
| Model | ID | Best For | Max Resolution |
|---|---|---|---|
| Flash | flash | Fast generation, high-volume tasks | 1024px |
| Pro | pro | Professional quality, complex prompts | 4K |
Create an image from a text description.
curl -X POST https://api.eng0.ai/api/data/images/generate \
-H "Content-Type: application/json" \
-d '{
"prompt": "A futuristic cityscape at sunset with flying cars",
"model": "flash",
"aspectRatio": "16:9"
}'
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | - | Text description of the image to generate |
model | string | No | flash | flash (fast, 1024px) or pro (high-quality, up to 4K) |
aspectRatio | string | No | 1:1 | Output aspect ratio |
imageSize | string | No | 1K | 1K, 2K, or 4K (4K only with pro model) |
Aspect Ratios:
| Ratio | Use Case |
|---|---|
1:1 | Square (social media, icons) |
16:9 | Landscape (presentations, banners) |
9:16 | Portrait (mobile, stories) |
4:3 | Standard landscape |
3:4 | Standard portrait |
21:9 | Ultra-wide (cinematic) |
2:3, 3:2, 4:5, 5:4 | Various formats |
Response:
{
"image": {
"base64": "iVBORw0KGgoAAAANSUhEUgAA...",
"mimeType": "image/png",
"dataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
},
"description": "A vibrant futuristic cityscape..."
}
Response Fields:
| Field | Description |
|---|---|
image.base64 | Base64-encoded image data |
image.mimeType | Image MIME type (typically image/png) |
image.dataUrl | Ready-to-use data URL for HTML/CSS |
description ... |