Nano Banana
ID:
google/nano-bananaNano Banana image generation API by Google — affordable Gemini 2.5 Flash-powered model with 11 aspect ratios and up to 10 reference images.
Text to imageImage editingReference images
Overview
Nano Banana image generation API by Google — affordable Gemini 2.5 Flash-powered model with 11 aspect ratios and up to 10 reference images.
Authentication
All API requests require a valid API key passed via the Authorization header using the Bearer scheme.
Quickstart
Credentials
Set the RUNBASE_API_KEY environment variable.
Shell
export RUNBASE_API_KEY=your-api-keyCreate a run
Shell
curl -s https://runbase.net/api/v1/runs \
-H "Authorization: Bearer $RUNBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana",
"input": {
"prompt": "A cinematic product photo of a ceramic lamp"
}
}'Runs
Runs are processed asynchronously. Submit a request, then poll for the result.
Create a run
Shell
curl -s https://runbase.net/api/v1/runs \
-H "Authorization: Bearer $RUNBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana",
"input": { "prompt": "A cinematic product photo of a ceramic lamp" }
}'Get run status
Shell
curl -s https://runbase.net/api/v1/runs/RUN_ID \
-H "Authorization: Bearer $RUNBASE_API_KEY"Get result
Poll the status endpoint until status is "succeeded", then read output.urls from the response.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Required | Prompt |
| aspect_ratio | string | Optional | Aspect ratioOptions: 1:12:33:23:44:34:55:49:1616:921:9auto |
| image_urls | string[] | Optional | Reference images |
Output Schema
| Field | Type | Description |
|---|---|---|
| urls | string[] | Generated output URLs |
Errors
The API uses standard HTTP status codes to indicate success or failure.
| Status Code | Description |
|---|---|
| 400 | Richiesta non valida - parametri mancanti o malformati |
| 401 | Autenticazione fallita - chiave API mancante o non valida |
| 402 | Crediti insufficienti |
| 403 | Accesso negato - IP non consentito o limite di spesa della chiave API superato |
| 404 | Esecuzione non trovata |
| 429 | Limite di frequenza superato |
| 500 | Errore interno del server |

