Developer API
Build on the Nano Banana API
The same engine that powers the workbench, over a simple REST API — create batches, poll results, track credits and history.
API access opens with any Pro subscription
Subscribe to Pro or Premium to receive your API key and unlock the 200 req/min rate limit. Without a subscription, trial access runs at 20 req/min.
Your API key
Demo modeAPI key
nb_test_demo_key_xxxPlaceholder key for layout preview only — it cannot call the API. Real keys are issued from your account once API access is enabled.
Developer API
Endpoints
Base path /api/v1. Requests and responses are JSON; errors follow a stable machine-readable model.
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/batches | Create a generation batch (prompts, aspect ratio, resolution, idempotency key). |
| GET | /api/v1/batches/:id | Poll batch status and per-slot results. |
| POST | /api/v1/batches/:id/slots/:slotId/retry | Retry a failed, timed-out or blocked slot. |
| GET | /api/v1/credits | Read the dual-track credit balance. |
| GET | /api/v1/history | List past batches, newest first, cursor-paginated. |
Developer API
Rate limits
| Plan | Requests per minute |
|---|---|
| Free | 20 |
| Pro / Premium | 200 |
Requests above the limit receive HTTP 429 with a Retry-After hint.
Developer API
Create a batch with curl
bash
curl -X POST https://nanobananalite.org/api/v1/batches \
-H "Authorization: Bearer $NB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompts": ["a banana astronaut planting a flag on the moon"],
"referenceImages": [],
"aspectRatio": "1:1",
"resolution": "2K",
"outputsPerPrompt": 1,
"idempotencyKey": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}'