Utilisez l'API RunComfy pour exécuter happyhorse/happyhorse-1.0/text-to-video. Pour les entrées et sorties acceptées, voir le schéma.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/happyhorse/happyhorse-1.0/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Wide shot. A lone astronaut in a dusty orange pressure suit with dark blue-gray harness straps and black boots skis across a vast lunar plain, leaving two long parallel tracks in the gray regolith behind. The astronaut is mid-stride, poles planted, pushing forward in 1/6th gravity, each push sending the body drifting slightly upward before settling back. Fine dust hangs in a low haze along the ski tracks. Behind and above, a crescent Earth sits just over the soft curve of the lunar horizon, blue-white atmospheric glow against total black sky. Raw sunlight, crushed shadows, no fill. 8K photorealistic. No logos on the suit."
}'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/happyhorse/happyhorse-1.0/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Wide shot. A lone astronaut in a dusty orange pressure suit with dark blue-gray harness straps and black boots skis across a vast lunar plain, leaving two long parallel tracks in the gray regolith behind. The astronaut is mid-stride, poles planted, pushing forward in 1/6th gravity, each push sending the body drifting slightly upward before settling back. Fine dust hangs in a low haze along the ski tracks. Behind and above, a crescent Earth sits just over the soft curve of the lunar horizon, blue-white atmospheric glow against total black sky. Raw sunlight, crushed shadows, no fill. 8K photorealistic. No logos on the suit."
}'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 la scène, le mouvement du sujet, la caméra, l'éclairage et l'audio implicite. Max. 2500 caractères.",
"type": "string",
"default": "Wide shot. A lone astronaut in a dusty orange pressure suit with dark blue-gray harness straps and black boots skis across a vast lunar plain, leaving two long parallel tracks in the gray regolith behind. The astronaut is mid-stride, poles planted, pushing forward in 1/6th gravity, each push sending the body drifting slightly upward before settling back. Fine dust hangs in a low haze along the ski tracks. Behind and above, a crescent Earth sits just over the soft curve of the lunar horizon, blue-white atmospheric glow against total black sky. Raw sunlight, crushed shadows, no fill. 8K photorealistic. No logos on the suit.",
"maxLength": 2500
},
"aspect_ratio": {
"title": "Format (L:H)",
"description": "Format de la vidéo générée.",
"type": "string",
"enum": [
"16:9",
"9:16",
"1:1",
"4:3",
"3:4"
],
"default": "16:9"
},
"resolution": {
"title": "Résolution",
"description": "Résolution de sortie. HappyHorse prend en charge 720P ou 1080P.",
"type": "string",
"enum": [
"720P",
"1080P"
],
"default": "1080P"
},
"duration": {
"title": "Durée",
"description": "Durée de la vidéo en secondes. Valeurs : 3–15.",
"type": "integer",
"enum": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
],
"default": 5
},
"seed": {
"title": "Graine",
"description": "Graine optionnelle pour des générations reproductibles. 0 = aléatoire.",
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"default": 0
},
"watermark": {
"title": "Filigrane",
"description": "Conserver ou non le filigrane du fournisseur.",
"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.