Nano Banana 2 Lite
ID :
google/nano-banana-2-liteNano Banana 2 Lite : Gemini 3.1 Flash Lite Image, environ 4 secondes, résolution 1K, tarif fixe par image.
Texte vers imageRetouche d'imageImages de référence1KRapide
Aperçu
Nano Banana 2 Lite : Gemini 3.1 Flash Lite Image, environ 4 secondes, résolution 1K, tarif fixe par image.
Authentification
Toutes les requêtes API nécessitent une clé API valide transmise via l'en-tête Authorization avec le schéma Bearer.
Démarrage rapide
Identifiants
Définissez la variable d'environnement RUNBASE_API_KEY.
Shell
export RUNBASE_API_KEY=your-api-keyCréer une exécution
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-2-lite",
"input": {
"prompt": "A cinematic product photo of a ceramic lamp"
}
}'Exécutions
Les exécutions sont traitées de manière asynchrone. Soumettez une requête, puis interrogez le résultat.
Créer une exécution
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-2-lite",
"input": { "prompt": "A cinematic product photo of a ceramic lamp" }
}'Obtenir le statut d'exécution
Shell
curl -s https://runbase.net/api/v1/runs/RUN_ID \
-H "Authorization: Bearer $RUNBASE_API_KEY"Obtenir le résultat
Interrogez l'endpoint de statut jusqu'à ce que status soit "succeeded", puis lisez output.urls dans la réponse.
Schéma d'entrée
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| prompt | string | Requis | Prompt |
| aspect_ratio | string | Optionnel | Aspect ratioOptions : 1:11:41:82:33:23:44:14:34:55:48:19:1616:921:9auto |
| image_urls | string[] | Optionnel | Reference images |
Schéma de sortie
| Champ | Type | Description |
|---|---|---|
| urls | string[] | URLs des résultats générés |
Erreurs
L'API utilise les codes de statut HTTP standard pour indiquer le succès ou l'échec.
| Code de statut | Description |
|---|---|
| 400 | Invalid request - missing or malformed parameters |
| 401 | Authentication failed - missing or invalid API key |
| 402 | Insufficient credits |
| 403 | Forbidden - IP not allowed or API key credit limit exceeded |
| 404 | Run not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |

