Generation cost
$0.010 / image
Image model
Base image generation model for marketing banners, product cards, and social media content.
API status: active via Grsai proxy
Generation cost
$0.010 / image
Request limit
100 QPS
Billing type
Per generation
Updated
2026-03-10
Endpoint: /api/v1/images/nanobanana/generate
Method: POST
Authorization: `Authorization: Bearer $APISTOR_API_KEY`
Response mode: stream by default or callback via `webHook`.
Result polling: /api/v1/images/nanobanana/result (POST with `id`).
Error types: /errors
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Supported values: nanobanano-2, nanobanano-2-2k, nanobanano-2-4k. |
| prompt | string | Yes | Generation prompt. |
| urls | string[] | No | Reference image URLs or base64 strings. |
| aspectRatio | string | No | Aspect ratio: auto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, 21:9. |
| webHook | string | No | Callback URL or '-1' for immediate task id return and follow-up polling. |
| shutProgress | boolean | No | Disable intermediate progress and return only final result. |
Request example (cURL)
curl -X POST "https://api.apistor.io/api/v1/images/nanobanana/generate" \
-H "Authorization: Bearer $APISTOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nanobanano-2",
"prompt": "High-quality ecommerce hero image of a futuristic banana product, soft studio light",
"aspectRatio": "auto",
"shutProgress": false
}'Response example (JSON)
{
"id": "f44bcf50-f2d0-4c26-a467-26f2014a771b",
"model": "nano-banana-2",
"progress": 100,
"status": "succeeded",
"results": [
{
"url": "https://example.com/generated-image.jpg",
"content": "High-quality ecommerce hero image of a futuristic banana product, soft studio light"
}
],
"failure_reason": null
}For polling: send webHook='-1' and use id with /api/v1/images/nanobanana/result.
Open error catalog