Nano Banana 2 high quality image generation.

Model:
Use reference images
Leave off for text-to-image. Turn on to upload or paste up to 14 reference images.
Output aspect ratio. Custom WxH pixel sizes remain accepted in JSON mode when supported upstream.
Output quality tier. 0.5K is text-to-image only.
Web search
Use web search to optimize image generation when supported upstream.
Image search
Search visual references to enhance generation quality when supported upstream.
Reasoning depth before generating images.
USD estimate $0.025-$0.05: highest recharge package uses $1 = 2,000 credits; entry package uses $1 = 1,000 credits.

History
Saved locally in this browser
0 running · 0 completed
Billing Rules
API Reference
Call this model through a standard REST API. Authenticate with your API key, then pick an endpoint below to see its parameters and examples.
Authentication
Every request needs a Bearer token in the Authorization header. Create an API key in the console.
Authorization: Bearer YOUR_API_KEYhttps://apiany.ai/v1/images/generationsRequest parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
model | string | Required | Model identifier to invoke. Use this model's ID. |
prompt | string | Required | Text prompt describing what you want to generate. |
size | string | Optional | Output aspect ratio. Custom WxH pixel sizes remain accepted in JSON mode when supported upstream. · Options: auto, 1:1, 1:4, 4:1, 1:8, 8:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 · Default: auto |
quality | string | Optional | Output quality tier. 0.5K is text-to-image only. · Options: 0.5K, 1K, 2K, 4K · Default: 2K |
model_params.web_search | boolean | Optional | Use web search to optimize image generation when supported upstream. · Default: false |
model_params.image_search | boolean | Optional | Search visual references to enhance generation quality when supported upstream. · Default: false |
model_params.thinking_level | string | Optional | Reasoning depth before generating images. · Options: auto, min, high · Default: auto |
callback_url | string | Optional | Optional webhook URL called when the async task finishes. |
Request example
curl "https://apiany.ai/v1/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"prompt": "A cinematic 4k product scene for APIAny.AI with crisp model cards",
"size": "auto",
"quality": "2K",
"model_params": {
"web_search": false,
"image_search": false,
"thinking_level": "auto"
}
}'Response example
{
"task_id": "task_abc123",
"status": "pending",
"poll_url": "/v1/tasks/task_abc123",
"request_id": "req_abc123",
"credits": {
"reserved": 1000
}
}This endpoint is asynchronous: it returns a task_id immediately. Poll the task-status endpoint until status becomes succeeded, then read the result. Generated media links stay valid for 24 hours.