New: the Nano Banana 2 Lite model is live on Nano Banana.

See the model

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 mode

API key

nb_test_demo_key_xxx

Placeholder 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.

MethodPathDescription
POST/api/v1/batchesCreate a generation batch (prompts, aspect ratio, resolution, idempotency key).
GET/api/v1/batches/:idPoll batch status and per-slot results.
POST/api/v1/batches/:id/slots/:slotId/retryRetry a failed, timed-out or blocked slot.
GET/api/v1/creditsRead the dual-track credit balance.
GET/api/v1/historyList past batches, newest first, cursor-paginated.

Developer API

Rate limits

PlanRequests per minute
Free20
Pro / Premium200

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"
  }'