Utilisez l'API RunComfy pour exécuter google/nano-banana/edit. Pour les entrées et sorties acceptées, voir le schéma.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/google/nano-banana/edit \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Blend a subtle blue-hour skyline into the background; preserve the main subject; introduce light drizzle and soft window glow; enhance reflections for a cinematic, polished look",
"image_urls": [
"https://playgrounds-storage-public.runcomfy.net/tools/7007/media-files/usecase2-2-input.png"
]
}'Définissez la variable d'environnement YOUR_API_TOKEN avec votre clé API (gestion dans Profil) et incluez à chaque requête un jeton Bearer dans l'en-tête Authorization : Authorization: Bearer $YOUR_API_TOKEN.
Soumettez une tâche de génération asynchrone et recevez immédiatement un request_id ainsi que des URLs pour le statut, les résultats et l'annulation.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/google/nano-banana/edit \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Blend a subtle blue-hour skyline into the background; preserve the main subject; introduce light drizzle and soft window glow; enhance reflections for a cinematic, polished look",
"image_urls": [
"https://playgrounds-storage-public.runcomfy.net/tools/7007/media-files/usecase2-2-input.png"
]
}'Récupère l'état actuel pour un request_id (« in_queue », « in_progress », « completed » ou « cancelled »).
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/status \
--header "Authorization: Bearer <token>"Récupère les sorties finales et métadonnées pour le request_id ; si le travail n'est pas terminé, la réponse indique l'état actuel pour poursuivre le polling.
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/result \
--header "Authorization: Bearer <token>"Annule un travail en file d'attente via request_id ; les travaux en cours ne peuvent pas être annulés.
curl --request POST \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/cancel \
--header "Authorization: Bearer <token>"Fournissez une URL HTTPS accessible publiquement. L'hôte doit autoriser les récupérations côté serveur (sans login/cookies), sans limitation de débit ni blocage des bots. Recommandé : images ≤ 50 Mo (~4K), vidéos ≤ 100 Mo (~2–5 min en 720p). Préférez des URL stables ou pré-signées pour les actifs privés.
{
"type": "object",
"title": "Schéma d'entrée",
"required": [
"prompt",
"image_urls"
],
"properties": {
"prompt": {
"title": "Prompt",
"description": "",
"type": "string",
"maxLength": 1000,
"default": "Blend a subtle blue-hour skyline into the background; preserve the main subject; introduce light drizzle and soft window glow; enhance reflections for a cinematic, polished look"
},
"image_urls": {
"title": "Images",
"description": "Upload up to 10 images of scene elements, such as characters, objects, and locations.",
"type": "array",
"items": {
"type": "string",
"format": "image_uri"
},
"maxItems": 10,
"minItems": 1,
"default": [
"https://playgrounds-storage-public.runcomfy.net/tools/7007/media-files/usecase2-2-input.png"
]
},
"aspect_ratio": {
"title": "Aspect Ratio (W:H)",
"description": "",
"type": "string",
"enum": [
"auto",
"21:9",
"16:9",
"3:2",
"4:3",
"5:4",
"1:1",
"4:5",
"3:4",
"2:3",
"9:16"
],
"default": "auto"
},
"output_format": {
"title": "Output Format",
"description": "",
"type": "string",
"enum": [
"jpeg",
"png",
"webp"
],
"default": "png"
},
"num_images": {
"title": "Number of Images",
"description": "Number of images to generate.",
"type": "integer",
"enum": [
1,
2,
3,
4
],
"default": 1
}
}
}{
"output": {
"type": "object",
"properties": {
"image": {
"type": "string",
"format": "uri",
"description": "URL d'une seule image"
},
"video": {
"type": "string",
"format": "uri",
"description": "URL d'une seule vidéo"
},
"images": {
"type": "array",
"description": "plusieurs URLs d'images",
"items": {
"type": "string",
"format": "uri"
}
},
"videos": {
"type": "array",
"description": "plusieurs URLs de vidéos",
"items": {
"type": "string",
"format": "uri"
}
}
}
}
}RunComfy est la première ComfyUI plateforme, offrant des ComfyUI en ligne environnement et services, ainsi que des workflows ComfyUI proposant des visuels époustouflants. RunComfy propose également AI Models, permettant aux artistes d'utiliser les derniers outils d'IA pour créer des œuvres d'art incroyables.