Usa la API de RunComfy para ejecutar alibaba/happyhorse-1.1/reference-to-video. Para entradas y salidas admitidas, consulta el esquema.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/alibaba/happyhorse-1.1/reference-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"image_url_1": "https://playgrounds-storage-public.runcomfy.net/tools/7373/media-files/ref-promo.webp",
"prompt": "The referenced woman walks slowly through a sunlit modern art gallery, tall windows casting soft golden light across white walls, her trench coat moving gently with each step, calm confident expression, faint ambient murmur and distant footsteps. Cinematic slow dolly-in, shallow depth of field, premium photoreal look, identity-stable face and outfit."
}'Define la variable de entorno YOUR_API_TOKEN con tu clave API (gestión en Perfil) e incluye en cada solicitud un token Bearer en la cabecera Authorization : Authorization: Bearer $YOUR_API_TOKEN.
Envía un trabajo de generación asíncrono y recibe de inmediato un request_id y URLs para consultar estado, obtener resultados y cancelar.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/alibaba/happyhorse-1.1/reference-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"image_url_1": "https://playgrounds-storage-public.runcomfy.net/tools/7373/media-files/ref-promo.webp",
"prompt": "The referenced woman walks slowly through a sunlit modern art gallery, tall windows casting soft golden light across white walls, her trench coat moving gently with each step, calm confident expression, faint ambient murmur and distant footsteps. Cinematic slow dolly-in, shallow depth of field, premium photoreal look, identity-stable face and outfit."
}'Obtiene el estado actual de un request_id ("in_queue", "in_progress", "completed" o "cancelled").
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/status \
--header "Authorization: Bearer <token>"Obtiene las salidas finales y metadatos del request_id; si el trabajo no ha terminado, la respuesta devuelve el estado actual para seguir haciendo polling.
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/result \
--header "Authorization: Bearer <token>"Cancela un trabajo en cola por request_id; los trabajos en curso no se pueden cancelar.
curl --request POST \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/cancel \
--header "Authorization: Bearer <token>"Proporciona una URL HTTPS públicamente accesible. El host debe permitir peticiones del servidor (sin login/cookies), sin rate limit agresivo ni bloqueo de bots. Recomendado: imágenes ≤ 50 MB (~4K), vídeos ≤ 100 MB (~2–5 min a 720p). Para activos privados, URLs estables o firmadas.
{
"type": "object",
"title": "Esquema de entrada",
"required": [
"image_url_1",
"prompt"
],
"properties": {
"prompt": {
"title": "Prompt",
"description": "Describe la escena, la acción, el movimiento de cámara y la atmósfera que quieres crear en torno a las imágenes de referencia. Hasta 5000 caracteres no chinos o 2500 caracteres chinos; las entradas más largas se truncan.",
"type": "string",
"default": "The referenced woman walks slowly through a sunlit modern art gallery, tall windows casting soft golden light across white walls, her trench coat moving gently with each step, calm confident expression, faint ambient murmur and distant footsteps. Cinematic slow dolly-in, shallow depth of field, premium photoreal look, identity-stable face and outfit.",
"maxLength": 5000
},
"ratio": {
"title": "Relación de aspecto",
"description": "Relación de aspecto del video generado.",
"type": "string",
"enum": [
"16:9",
"9:16",
"1:1"
],
"default": "16:9"
},
"duration": {
"title": "Duración",
"description": "Duración del video de salida, en segundos. Valores permitidos: 3-15.",
"type": "integer",
"enum": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
],
"default": 5
},
"image_url_1": {
"title": "Imagen de referencia 1",
"description": "Imagen de referencia principal cuyo sujeto, estilo o composición guiará el video. Formatos: JPEG, JPG, PNG o WEBP.",
"type": "string",
"default": "https://playgrounds-storage-public.runcomfy.net/tools/7373/media-files/ref-promo.webp"
},
"image_url_2": {
"title": "Imagen de referencia 2",
"description": "Imagen de referencia adicional opcional. Formatos: JPEG, JPG, PNG o WEBP.",
"type": "string",
"default": ""
},
"image_url_3": {
"title": "Imagen de referencia 3",
"description": "Imagen de referencia adicional opcional. Formatos: JPEG, JPG, PNG o WEBP.",
"type": "string",
"default": ""
},
"image_url_4": {
"title": "Imagen de referencia 4",
"description": "Imagen de referencia adicional opcional. Formatos: JPEG, JPG, PNG o WEBP.",
"type": "string",
"default": ""
},
"image_url_5": {
"title": "Imagen de referencia 5",
"description": "Imagen de referencia adicional opcional. Formatos: JPEG, JPG, PNG o WEBP.",
"type": "string",
"default": ""
},
"image_url_6": {
"title": "Imagen de referencia 6",
"description": "Imagen de referencia adicional opcional. Formatos: JPEG, JPG, PNG o WEBP.",
"type": "string",
"default": ""
},
"image_url_7": {
"title": "Imagen de referencia 7",
"description": "Imagen de referencia adicional opcional. Formatos: JPEG, JPG, PNG o WEBP.",
"type": "string",
"default": ""
},
"image_url_8": {
"title": "Imagen de referencia 8",
"description": "Imagen de referencia adicional opcional. Formatos: JPEG, JPG, PNG o WEBP.",
"type": "string",
"default": ""
},
"image_url_9": {
"title": "Imagen de referencia 9",
"description": "Imagen de referencia adicional opcional. Se pueden combinar hasta 9 imágenes de referencia. Formatos: JPEG, JPG, PNG o WEBP.",
"type": "string",
"default": ""
},
"resolution": {
"title": "Resolución",
"description": "Resolución del video de salida. Happy Horse 1.1 reference to video admite 720P o 1080P.",
"type": "string",
"enum": [
"720P",
"1080P"
],
"default": "1080P"
},
"seed": {
"title": "Semilla",
"description": "Semilla opcional para obtener generaciones reproducibles. Usa 0 para que el proveedor elija un valor aleatorio.",
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"default": 0
},
"watermark": {
"title": "Marca de agua",
"description": "Indica si se conservará la marca de agua del proveedor en el video generado.",
"type": "boolean",
"default": false
}
}
}{
"output": {
"type": "object",
"properties": {
"image": {
"type": "string",
"format": "uri",
"description": "URL de una sola imagen"
},
"video": {
"type": "string",
"format": "uri",
"description": "URL de un solo vídeo"
},
"images": {
"type": "array",
"description": "varias URLs de imagen",
"items": {
"type": "string",
"format": "uri"
}
},
"videos": {
"type": "array",
"description": "varias URLs de vídeo",
"items": {
"type": "string",
"format": "uri"
}
}
}
}
}RunComfy es la principal ComfyUI plataforma, ofreciendo ComfyUI en línea entorno y servicios, junto con flujos de trabajo de ComfyUI con impresionantes imágenes. RunComfy también ofrece AI Models, permitiendo a los artistas aprovechar las últimas herramientas de AI para crear arte increíble.