Utilisez l'API RunComfy pour exécuter openai/gpt-image-2.5/flare/edit. Pour les entrées et sorties acceptées, voir le schéma.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/openai/gpt-image-2.5/flare/edit \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Keep the woman's face, freckles, hair, and pose unchanged. Change only the background loft wall behind her to a soft sage plaster wall and add a thin magazine masthead at the top that reads \"NORTH\". Do not change her identity or coat cut.",
"images": [
"https://playgrounds-storage-public.runcomfy.net/tools/7457/media-files/promo-input.webp"
]
}'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/openai/gpt-image-2.5/flare/edit \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Keep the woman's face, freckles, hair, and pose unchanged. Change only the background loft wall behind her to a soft sage plaster wall and add a thin magazine masthead at the top that reads \"NORTH\". Do not change her identity or coat cut.",
"images": [
"https://playgrounds-storage-public.runcomfy.net/tools/7457/media-files/promo-input.webp"
]
}'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",
"images"
],
"properties": {
"images": {
"title": "Images",
"description": "Images de référence à modifier ou à combiner, jusqu'à 16 images.",
"type": "array",
"items": {
"type": "string",
"format": "image_uri"
},
"maxItems": 16,
"minItems": 1,
"default": [
"https://playgrounds-storage-public.runcomfy.net/tools/7457/media-files/promo-input.webp"
]
},
"prompt": {
"title": "Prompt",
"description": "",
"type": "string",
"default": "Keep the woman's face, freckles, hair, and pose unchanged. Change only the background loft wall behind her to a soft sage plaster wall and add a thin magazine masthead at the top that reads \"NORTH\". Do not change her identity or coat cut."
},
"aspect_ratio": {
"title": "Format d'image",
"description": "Rapport d'aspect de sortie pour l'image modifiée.",
"type": "string",
"enum": [
"1:1",
"3:2",
"2:3",
"3:4",
"4:3",
"4:5",
"5:4",
"9:16",
"16:9",
"21:9",
"2:1",
"1:2",
"3:1",
"1:3",
"9:21"
],
"default": "3:4"
},
"resolution": {
"title": "Résolution",
"description": "Niveau de résolution de sortie.",
"type": "string",
"enum": [
"1k",
"2k",
"4k"
],
"default": "1k"
},
"quality": {
"title": "Qualité",
"description": "Qualité du rendu. Une qualité supérieure ajoute des détails mais coûte plus cher.",
"type": "string",
"enum": [
"low",
"medium",
"high",
"xhigh",
"max"
],
"default": "medium"
},
"output_format": {
"title": "Format de sortie",
"description": "Format de fichier image de sortie.",
"type": "string",
"enum": [
"png",
"jpeg",
"webp"
],
"default": "png"
}
}
}{
"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.