Nano Banana Pro
Nano Banana Pro
Génération d'images haute qualité avec des options de résolution allant jusqu'au 4K
- Endpoint
- POST /api/v1/images/generate
- model
- nano-banana-pro
- Output
- Image
- Credits
- from 8
1
Soumettre une tâche
POST
/api/v1/images/generateParamètres
modelstringObligatoireMust be "nano-banana-pro"
typestringFacultatifPar défauttext-to-image"text-to-image" or "image-to-image" (default: text-to-image)
text-to-imageimage-to-imagepromptstringObligatoireText description of the image to generate
resolutionstringFacultatif"1K", "2K", or "4K"
1K2K4Kaspect_ratiostringFacultatif"1:1", "16:9", "9:16", "4:3", "3:4"
1:116:99:164:33:4image_urlsstring[]FacultatifInput image URLs or base64 for image-to-image. The active generation channel accepts up to 8 or 14 images.
input_imagestringFacultatifDeprecated. Alias for image_urls[0]
num_imagesnumberFacultatifMust be 1
Requête
curl -X POST https://www.bananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-pro",
"resolution": "2K",
"prompt": "A majestic dragon flying over a medieval castle",
"aspect_ratio": "16:9"
}'Réponse200
{
"success": true,
"data": {
"task_id": "task_xyz789",
"credits_used": 12,
"remaining_credits": 488,
"model": "nano-banana-pro"
}
}Les valeurs credits_used de ces exemples sont indicatives. La consommation réelle est calculée à l'envoi et renvoyée par l'API.
2
Consulter la tâche
GET
/api/v1/images/{task_id}status
pending- Accepted and waiting to start. Keep polling.
processing- Running. Keep polling.
completed- Finished. Read image_url; output holds the full result.
failed- Ended without a result. error_message says why and credits_refunded shows what was returned.
Poll every 5 to 10 seconds and stop at completed or failed, or register a webhook to be notified instead. Failed tasks are refunded automatically.
Requête
curl https://www.bananapro.site/api/v1/images/task_abc123 \
-H "Authorization: Bearer sk-your-api-key"Réponse200
{
"success": true,
"data": {
"task_id": "task_abc123",
"model": "nano-banana-pro",
"status": "completed",
"output": { "images": [{ "url": "https://..." }] },
"primary_url": "https://...",
"image_url": "https://...",
"error_message": null,
"credits_used": 12,
"credits_refunded": 0,
"created_at": "2026-10-04T10:00:00.000Z",
"updated_at": "2026-10-04T10:01:12.000Z",
"completed_at": "2026-10-04T10:01:12.000Z"
},
"request_id": "req_abc123"
}Attendre le résultat
TASK_ID=task_abc123
while true; do
TASK=$(curl -s https://www.bananapro.site/api/v1/images/$TASK_ID \
-H "Authorization: Bearer sk-your-api-key")
STATUS=$(echo "$TASK" | jq -r '.data.status')
if [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ]; then
echo "$TASK" | jq
break
fi
sleep 10
doneTarification
| Resolution | Credits |
|---|---|
| 1K | 8 |
| 2K | 12 |
| 4K | 16 |
Fonctionnalités
- Génération d'images à partir de texte
- Transformation d'image à image
- Résolutions multiples (1K/2K/4K)
- Résultat de meilleure qualité