Google Nano Banana Pro API

NB Pro est le modèle d’image Nano Banana Pro : génération à partir de texte et retouche avec jusqu’à 14 images de référence, une image par requête en 1k, 2k ou 4k.

Essayer en ligne · Obtenir une clé API · Lire la documentation

Capacités

Modèle
Image
Modèle API
zhenzhen-image-nb-pro
Points de terminaison
POST /v1/image/generations, GET /v1/image/generations/{id}
Paramètres
prompt: 5–5000, images: 0–14, n: 1, size: auto / 1:1 / 2:3 / 3:2 / 3:4 / 4:3 / 4:5 / 5:4 / 9:16 / 16:9 / 21:9, resolution: 1k / 2k / 4k

Tarif actuel

zhenzhen-image-nb-pro: ≈¥0.18–0.22 par requête

Variantes du modèle

Modèle APIUtilisationTarif actuel
zhenzhen-image-nb-proImage≈¥0.18–0.22 par requête
zhenzhen-image-nb-pro-lowpriceImage¥0.09–0.15 par requête

Exemples de la galerie

  • Tentation des orteilsTentation des orteils

    Modèle API: zhenzhen-image-nb-pro

    Tentation des orteils — découvrez cette création avec zhenzhen-image-nb-pro sur OpenZhenZhen, son prompt original et un exemple de génération à réutiliser.

  • Tentation des orteilsTentation des orteils

    Modèle API: zhenzhen-image-nb-pro

    Tentation des orteils — découvrez cette création avec zhenzhen-image-nb-pro sur OpenZhenZhen, son prompt original et un exemple de génération à réutiliser.

  • GéanteGéante

    Modèle API: zhenzhen-image-nb-pro

    Géante — découvrez cette création avec zhenzhen-image-nb-pro sur OpenZhenZhen, son prompt original et un exemple de génération à réutiliser.

  • GéanteGéante

    Modèle API: zhenzhen-image-nb-pro

    Géante — découvrez cette création avec zhenzhen-image-nb-pro sur OpenZhenZhen, son prompt original et un exemple de génération à réutiliser.

  • GéanteGéante

    Modèle API: zhenzhen-image-nb-pro

    Géante — découvrez cette création avec zhenzhen-image-nb-pro sur OpenZhenZhen, son prompt original et un exemple de génération à réutiliser.

  • Contorsion de la troupe acrobatiqueContorsion de la troupe acrobatique

    Modèle API: zhenzhen-image-nb-pro

    Contorsion de la troupe acrobatique — découvrez cette création avec zhenzhen-image-nb-pro sur OpenZhenZhen, son prompt original et un exemple de génération à réutiliser.

Explorer la galerie de prompts

Démarrage rapide

Exemple : générez une ville de nuit en 16:9 à partir d’un prompt, puis ajoutez des images pour harmoniser le style ou modifier des détails. Le prompt fait 5 à 5000 caractères. Ratio : auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 ou 21:9, avec 1:1 par défaut sans référence et auto avec références. n doit valoir 1 ; output_format et quality sont ignorés. La variante économique zhenzhen-image-nb-pro-lowprice utilise un autre fournisseur : prompt de 1 à 5000 caractères, erreur si output_format, width, height ou quality sont envoyés, et liens de résultat valables 2 heures.

cURL

curl --fail-with-body https://www.zzai.app/v1/image/generations \
  -H "Authorization: Bearer $SEEDANCE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"metadata":{"resolution":"1k"},"model":"zhenzhen-image-nb-pro","n":1,"prompt":"A cyberpunk city at night with neon reflections on wet streets.","size":"16:9"}'

Python

import json, os, requests

payload = json.loads(r'''{"metadata":{"resolution":"1k"},"model":"zhenzhen-image-nb-pro","n":1,"prompt":"A cyberpunk city at night with neon reflections on wet streets.","size":"16:9"}''')
response = requests.post(
    "https://www.zzai.app/v1/image/generations",
    headers={"Authorization": "Bearer " + os.environ["SEEDANCE_API_KEY"]},
    json=payload, timeout=120,
)
response.raise_for_status()
print(response.json()["id"])

JavaScript

const response = await fetch("https://www.zzai.app/v1/image/generations", {
  method: 'POST',
  headers: { Authorization: 'Bearer ' + process.env.SEEDANCE_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({"metadata":{"resolution":"1k"},"model":"zhenzhen-image-nb-pro","n":1,"prompt":"A cyberpunk city at night with neon reflections on wet streets.","size":"16:9"}),
});
if (!response.ok) throw new Error(await response.text());
console.log((await response.json()).id);

Enregistrez l’id retourné et remplacez TASK_ID dans la requête de suivi. Interrogez toutes les 3 à 5 secondes jusqu’au succès ou à l’échec ; l’envoi ne signifie pas que la génération est terminée. Sauvegardez rapidement les fichiers. data.status: SUCCESS / FAILURE; data.result_url.

curl --fail-with-body https://www.zzai.app/v1/image/generations/$TASK_ID \
  -H "Authorization: Bearer $SEEDANCE_API_KEY"

Questions fréquentes

Comment appeler ce modèle ?

Créez une clé API, utilisez le nom du modèle ci-dessous et envoyez une requête à l'endpoint compatible OpenAI indiqué dans la documentation.