Usa la API de RunComfy para ejecutar wan-ai/wan-2-2/lora/image-to-video. Para entradas y salidas admitidas, consulta el esquema.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/wan-ai/wan-2-2/lora/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "The woman is walking slowly",
"image_url": "https://playgrounds-storage-public.runcomfy.net/tools/7002/media-files/usecase5-1-2-input.jpg",
"loras": [
{
"path": "https://huggingface.co/neph1/hard_cut_wan_lora/blob/main/hard_cut_200_wan_i2v_high.safetensors",
"transformer": "both",
"scale": 1
}
]
}'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/wan-ai/wan-2-2/lora/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "The woman is walking slowly",
"image_url": "https://playgrounds-storage-public.runcomfy.net/tools/7002/media-files/usecase5-1-2-input.jpg",
"loras": [
{
"path": "https://huggingface.co/neph1/hard_cut_wan_lora/blob/main/hard_cut_200_wan_i2v_high.safetensors",
"transformer": "both",
"scale": 1
}
]
}'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": [
"prompt",
"image_url",
"loras"
],
"properties": {
"image_url": {
"title": "Imagen inicial",
"description": "URL de imagen obligatoria que sirve como fotograma inicial del vídeo.",
"type": "string",
"default": "https://playgrounds-storage-public.runcomfy.net/tools/7002/media-files/usecase5-1-2-input.jpg"
},
"prompt": {
"title": "Prompt",
"description": "Describe el sujeto, la acción, el entorno, el encuadre y la dirección visual deseada.",
"type": "string",
"default": "The woman is walking slowly"
},
"loras": {
"title": "LoRA",
"description": "Lista obligatoria de hasta 3 LoRA; cada ruta puede ser una URL o el ID de un repositorio de Hugging Face.",
"type": "array",
"default": [
{
"path": "https://huggingface.co/neph1/hard_cut_wan_lora/blob/main/hard_cut_200_wan_i2v_high.safetensors",
"transformer": "both",
"scale": 1
}
],
"items": {
"path": {
"title": "Ruta de LoRA",
"description": "URL o ID de repositorio de Hugging Face (owner/repo) de los pesos LoRA.",
"type": "string",
"format": "str",
"default": ""
},
"transformer": {
"title": "Destino de LoRA",
"description": "Elige `high`, `low` o `both`; el valor predeterminado es `both`.",
"type": "string",
"format": "str_with_choice",
"enum": [
"high",
"low",
"both"
],
"default": "both"
},
"scale": {
"title": "Intensidad de LoRA",
"description": "Intensidad de aplicación de 0 a 4; el valor predeterminado es 1.",
"type": "float",
"format": "float_slider_with_range",
"minimum": 0,
"maximum": 4,
"default": 1
}
},
"maxItems": 3,
"minItems": 0
},
"num_frames": {
"title": "Número de fotogramas",
"description": "Valor de 17 a 161; el predeterminado es 81.",
"type": "integer",
"default": 81,
"minimum": 17,
"maximum": 161
},
"frames_per_second": {
"title": "Fotogramas por segundo",
"description": "Valor de 4 a 60; el predeterminado es 16.",
"type": "integer",
"default": 16,
"minimum": 4,
"maximum": 60
},
"resolution": {
"title": "Resolución",
"description": "Elige `480p`, `580p` o `720p`; el valor predeterminado es `480p`.",
"type": "string",
"enum": [
"480p",
"580p",
"720p"
],
"default": "480p"
},
"aspect_ratio": {
"title": "Relación de aspecto (an.:al.)",
"description": "Elige `16:9`, `9:16`, `1:1` o `auto`; el valor predeterminado es `auto`.",
"type": "string",
"enum": [
"16:9",
"9:16",
"1:1",
"auto"
],
"default": "auto"
},
"num_inference_steps": {
"title": "Número de pasos de inferencia",
"description": "Valor de 2 a 40; el predeterminado es 27.",
"type": "integer",
"default": 27,
"minimum": 2,
"maximum": 40
},
"negative_prompt": {
"title": "Prompt negativo",
"description": "Descripción opcional de los elementos que deben evitarse.",
"type": "string",
"default": ""
},
"seed": {
"title": "Seed",
"description": "Seed entero de 10000 a 99999.",
"type": "integer",
"maximum": 99999,
"minimum": 10000,
"default": 15775
}
}
}{
"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.