Utilisez l'API RunComfy pour exécuter ideogram/ideogram-v2/generate. Pour les entrées et sorties acceptées, voir le schéma.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/ideogram/ideogram-v2/generate \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A photo of a fashion lookbook spread with a sustainable clothing item. There is a natural cotton dress with a linen tag attached to it. The tag has the text \"Wear the Change You Wish to See\". The background is a sunlit forest. The styling and setting have soft, earthy tones. The text is subtle but stylish, blending into the fabric's texture. The overall look is modern, mindful, and eco-conscious."
}'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/ideogram/ideogram-v2/generate \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A photo of a fashion lookbook spread with a sustainable clothing item. There is a natural cotton dress with a linen tag attached to it. The tag has the text \"Wear the Change You Wish to See\". The background is a sunlit forest. The styling and setting have soft, earthy tones. The text is subtle but stylish, blending into the fabric's texture. The overall look is modern, mindful, and eco-conscious."
}'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"
],
"properties": {
"prompt": {
"title": "Prompt",
"description": "Texte obligatoire décrivant l'image, la composition, le style et tout texte qui doit apparaître.",
"type": "string",
"default": "A photo of a fashion lookbook spread with a sustainable clothing item. There is a natural cotton dress with a linen tag attached to it. The tag has the text \"Wear the Change You Wish to See\". The background is a sunlit forest. The styling and setting have soft, earthy tones. The text is subtle but stylish, blending into the fabric's texture. The overall look is modern, mindful, and eco-conscious."
},
"style": {
"title": "Style",
"description": "Choisissez auto, général, réaliste, design, render_3D ou anime ; par défaut : automatique.",
"type": "string",
"enum": [
"auto",
"general",
"realistic",
"design",
"render_3D",
"anime"
],
"default": "auto"
},
"aspect_ratio": {
"title": "Format d’image (L:H)",
"description": "Choisissez l'un des onze formats d'image répertoriés ; par défaut : 1:1.",
"type": "string",
"enum": [
"3:1",
"16:9",
"16:10",
"3:2",
"4:3",
"1:1",
"3:4",
"2:3",
"10:16",
"9:16",
"1:3"
],
"default": "1:1"
},
"expand_prompt": {
"title": "Magic Prompt",
"description": "Développe automatiquement l'invite avec des détails supplémentaires ; activé par défaut.",
"type": "boolean",
"default": true
},
"negative_prompt": {
"title": "Prompt négatif",
"description": "Texte facultatif décrivant les éléments à éviter dans l'image générée.",
"type": "string",
"default": ""
},
"seed": {
"title": "Graine",
"description": "Graine entière de 0 à 2147483647 pour reproduire ou faire varier un résultat ; par défaut : 166035072.",
"type": "integer",
"default": 166035072,
"maximum": 2147483647,
"minimum": 0
}
}
}{
"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.