Utilisez l'API RunComfy pour exécuter blackforestlabs/flux-1-1-pro/text-to-image. Pour les entrées et sorties acceptées, voir le schéma.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/blackforestlabs/flux-1-1-pro/text-to-image \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A cocktail menu book placed on a bar counter. The cover design is minimalist with the 'Zeitinsel' logo prominently centered on the front. Below the logo is an elegant photograph of an Aviation cocktail in a crystal coupe glass, showcasing its signature lavender-blue hue with a maraschino cherry floating delicately on top. The lighting captures the subtle purple tones while the liquid appears silky smooth, creating an ethereal and sophisticated appearance. The cover maintains a clean and elegant aesthetic."
}'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/blackforestlabs/flux-1-1-pro/text-to-image \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A cocktail menu book placed on a bar counter. The cover design is minimalist with the 'Zeitinsel' logo prominently centered on the front. Below the logo is an elegant photograph of an Aviation cocktail in a crystal coupe glass, showcasing its signature lavender-blue hue with a maraschino cherry floating delicately on top. The lighting captures the subtle purple tones while the liquid appears silky smooth, creating an ethereal and sophisticated appearance. The cover maintains a clean and elegant aesthetic."
}'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": "Décrivez aussi précisément que possible l’image souhaitée.",
"type": "string",
"default": "A cocktail menu book placed on a bar counter. The cover design is minimalist with the 'Zeitinsel' logo prominently centered on the front. Below the logo is an elegant photograph of an Aviation cocktail in a crystal coupe glass, showcasing its signature lavender-blue hue with a maraschino cherry floating delicately on top. The lighting captures the subtle purple tones while the liquid appears silky smooth, creating an ethereal and sophisticated appearance. The cover maintains a clean and elegant aesthetic."
},
"image_size": {
"title": "Format d’image (L:H)",
"description": "Une valeur personnalisée doit être un multiple de 32 ; sinon, elle est automatiquement arrondie au multiple de 32 le plus proche.",
"type": "string",
"enum": [
"16:9",
"4:3",
"1:1",
"1:1 (hd)",
"3:4",
"9:16",
"Custom"
],
"default": "16:9"
},
"seed": {
"title": "Graine",
"description": "Une graine entière aide à reproduire la même configuration.",
"type": "integer",
"default": 81048285
},
"raw": {
"title": "Mode Raw",
"description": "Lorsqu’il est activé, il produit des images moins traitées et plus naturelles.",
"type": "boolean",
"default": false
}
}
}{
"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.