Runbase

Command Palette

Search for a command to run...

Gemini

Nano Banana 2 Lite

ID :google/nano-banana-2-lite

Nano 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-key

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

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ètreTypeRequisDescription
promptstringRequisPrompt
aspect_ratiostringOptionnelAspect ratioOptions : 1:11:41:82:33:23:44:14:34:55:48:19:1616:921:9auto
image_urlsstring[]OptionnelReference images

Schéma de sortie

ChampTypeDescription
urlsstring[]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 statutDescription
400Invalid request - missing or malformed parameters
401Authentication failed - missing or invalid API key
402Insufficient credits
403Forbidden - IP not allowed or API key credit limit exceeded
404Run not found
429Rate limit exceeded
500Internal server error