使用 RunComfy 的 API 运行 ltx/ltx-2-19b/video-to-video/lora。 可接受的输入与输出请参阅模型的 数据结构说明。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/ltx/ltx-2-19b/video-to-video/lora \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "black-and-white video, a girl is playing a guitar, film grain",
"video_url": "https://playgrounds-storage-public.runcomfy.net/tools/7312/media-files/input-1-1.mp4",
"loras": [
{
"path": "Lightricks/LTX-2-19b-IC-LoRA-Detailer",
"scale": 1
}
]
}'将 YOUR_API_TOKEN 环境变量设置为您的 API 密钥(在 个人资料中管理密钥),并在每个请求的 Authorization 标头中以 Bearer 令牌形式携带: Authorization: Bearer $YOUR_API_TOKEN。
提交异步生成任务,将立即获得 request_id 以及用于查询状态、获取结果和取消的 URL。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/ltx/ltx-2-19b/video-to-video/lora \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "black-and-white video, a girl is playing a guitar, film grain",
"video_url": "https://playgrounds-storage-public.runcomfy.net/tools/7312/media-files/input-1-1.mp4",
"loras": [
{
"path": "Lightricks/LTX-2-19b-IC-LoRA-Detailer",
"scale": 1
}
]
}'根据 request_id 获取当前状态("in_queue"、"in_progress"、"completed" 或 "cancelled")。
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/status \
--header "Authorization: Bearer <token>"获取指定 request_id 的最终输出与元数据;若任务未完成,响应会返回当前状态,便于继续轮询。
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/result \
--header "Authorization: Bearer <token>"通过 request_id 取消排队中的任务;进行中的任务无法取消。
curl --request POST \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/cancel \
--header "Authorization: Bearer <token>"请提供可公网访问的 HTTPS 地址。确保目标主机允许服务端拉取(无需登录或 Cookie)、未被限流或拦截爬虫。建议:图片 ≤ 50 MB(约 4K),视频 ≤ 100 MB(约 720p 下 2–5 分钟)。私有资源请使用稳定或预签名 URL。
{
"type": "object",
"title": "输入结构",
"required": [
"prompt",
"video_url",
"loras"
],
"properties": {
"prompt": {
"title": "提示词",
"description": "",
"type": "string",
"default": "black-and-white video, a girl is playing a guitar, film grain"
},
"video_url": {
"title": "视频 URL",
"description": "用于生成目标视频的源视频 URL。",
"type": "string",
"default": "https://playgrounds-storage-public.runcomfy.net/tools/7312/media-files/input-1-1.mp4"
},
"image_url": {
"title": "图片",
"description": "可选图片 URL,用作生成视频的首帧。",
"type": "string"
},
"loras": {
"title": "LoRA 列表",
"description": "要应用的 LoRA 列表,最多 10 个。",
"type": "array",
"default": [
{
"path": "Lightricks/LTX-2-19b-IC-LoRA-Detailer",
"scale": 1
}
],
"items": {
"path": {
"title": "LoRA 路径",
"description": "LoRA 权重的 URL 或 Hugging Face 仓库 ID(owner/repo)。",
"type": "string",
"format": "str",
"default": ""
},
"scale": {
"title": "LoRA 强度",
"description": "LoRA 模型的应用强度。",
"type": "float",
"format": "float_slider_with_range",
"minimum": 0,
"maximum": 4,
"default": 1
}
},
"maxItems": 10,
"minItems": 0
},
"match_video_length": {
"title": "匹配源视频时长",
"description": "启用后,根据源视频时长和 FPS 计算帧数;关闭后使用指定的 num_frames。",
"type": "boolean",
"default": true
},
"num_frames": {
"title": "帧数",
"description": "要生成的视频帧数。",
"type": "integer",
"minimum": 9,
"maximum": 481,
"default": 121
},
"video_size": {
"title": "视频尺寸",
"description": "生成视频的画面尺寸。",
"type": "string",
"enum": [
"auto",
"square_hd",
"square",
"portrait_4_3",
"portrait_16_9",
"landscape_4_3",
"landscape_16_9"
],
"default": "auto"
},
"generate_audio": {
"title": "生成音频",
"description": "是否为视频生成音频。",
"type": "boolean",
"default": true
},
"use_multiscale": {
"title": "使用多尺度生成",
"description": "启用后,模型会先生成较小尺寸的版本,再在目标尺寸上细化画面细节。",
"type": "boolean",
"default": true
},
"match_input_fps": {
"title": "匹配输入帧率",
"description": "启用后,输出 FPS 将匹配输入视频的 FPS,而不是使用默认目标帧率。",
"type": "boolean",
"default": true
},
"fps": {
"title": "帧率",
"description": "生成视频每秒包含的帧数。",
"type": "float",
"minimum": 1,
"maximum": 60,
"default": 25
},
"guidance_scale": {
"title": "引导系数",
"description": "生成时使用的提示词引导强度。",
"type": "float",
"minimum": 1,
"maximum": 10,
"default": 3
},
"num_inference_steps": {
"title": "推理步数",
"description": "生成时使用的推理步数。",
"type": "integer",
"minimum": 8,
"maximum": 50,
"default": 40
},
"camera_lora": {
"title": "相机 LoRA",
"description": "用于控制镜头运动的相机 LoRA。",
"type": "string",
"enum": [
"dolly_in",
"dolly_out",
"dolly_left",
"dolly_right",
"jib_up",
"jib_down",
"static",
"none"
],
"default": "none"
},
"camera_lora_scale": {
"title": "相机 LoRA 强度",
"description": "相机 LoRA 控制镜头运动时的应用强度。",
"type": "float",
"minimum": 0,
"maximum": 1,
"default": 1
},
"negative_prompt": {
"title": "负向提示词",
"description": "描述希望模型在生成结果中避免的内容或缺陷。",
"type": "string",
"default": "blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise, grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones, deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands, wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction, mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise, off-sync audio,incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting, inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts."
},
"seed": {
"title": "随机种子",
"description": "",
"type": "integer",
"default": 0
},
"enable_prompt_expansion": {
"title": "启用提示词扩展",
"description": "是否自动扩展提示词。",
"type": "boolean",
"default": false
},
"video_output_type": {
"title": "视频输出格式",
"description": "生成视频的文件格式。",
"type": "string",
"enum": [
"X264 (.mp4)",
"VP9 (.webm)",
"PRORES4444 (.mov)",
"GIF (.gif)"
],
"default": "X264 (.mp4)"
},
"video_quality": {
"title": "视频质量",
"description": "生成视频的质量等级。",
"type": "string",
"enum": [
"low",
"medium",
"high",
"maximum"
],
"default": "high"
},
"preprocessor": {
"title": "预处理器",
"description": "用于处理输入视频的预处理器。",
"type": "string",
"enum": [
"depth",
"canny",
"pose",
"none"
],
"default": "none"
},
"ic_lora": {
"title": "IC-LoRA",
"description": "要加载的 IC-LoRA 类型。",
"type": "string",
"enum": [
"match_preprocessor",
"canny",
"depth",
"pose",
"detailer",
"none"
],
"default": "match_preprocessor"
},
"ic_lora_scale": {
"title": "IC-LoRA 强度",
"description": "IC-LoRA 的应用强度。",
"type": "float",
"minimum": 0,
"maximum": 1,
"default": 1
},
"video_strength": {
"title": "视频参考强度",
"description": "视频条件控制强度。数值越低,模型改变源视频内容的自由度越高。",
"type": "float",
"minimum": 0,
"maximum": 1,
"default": 1
}
}
}{
"output": {
"type": "object",
"properties": {
"image": {
"type": "string",
"format": "uri",
"description": "单张图片 URL"
},
"video": {
"type": "string",
"format": "uri",
"description": "单个视频 URL"
},
"images": {
"type": "array",
"description": "多张图片 URL",
"items": {
"type": "string",
"format": "uri"
}
},
"videos": {
"type": "array",
"description": "多个视频 URL",
"items": {
"type": "string",
"format": "uri"
}
}
}
}
}RunComfy 是首选的 ComfyUI 平台,提供 ComfyUI 在线 环境和服务,以及 ComfyUI 工作流 具有惊艳的视觉效果。 RunComfy还提供 AI Models, 帮助艺术家利用最新的AI工具创作出令人惊叹的艺术作品。