Используйте API RunComfy для запуска kling/kling-3.0/pro/text-to-video. Допустимые входы и выходы см. в схеме.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/kling/kling-3.0/pro/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Cinematic multi-shot of a young American couple celebrating their anniversary at a candlelit terrace dinner in Tuscany at golden hour. Wide establishing shot sweeps over rolling vineyard hills, cypress trees casting long shadows, then cuts to a slow dolly-in on a stone terrace where a woman in an ivory linen dress laughs softly while the man in a navy rolled-sleeve shirt pours red wine. Cut to a tender close-up: their hands interlace across the table, candlelight catching her diamond ring, his thumb gently brushing hers. Cut to a profile two-shot as he leans in and whispers; she smiles, eyes glistening, golden light rim-lighting her loose blonde hair. Final shot: a graceful crane pull-back revealing the terrace, the warm villa, and the sun melting into the Tuscan horizon. Distant church bells, light cricket ambience, soft acoustic guitar. Photoreal skin, fabric texture, wine ripples — shot on Arri Alexa 35, anamorphic lenses, shallow depth of field, premium cinematic color grade."
}'Задайте для переменной окружения YOUR_API_TOKEN ваш API-ключ (управление в Профиль) и передавайте в каждом запросе Bearer-токен в заголовке Authorization : Authorization: Bearer $YOUR_API_TOKEN.
Отправьте асинхронную задачу генерации и сразу получите request_id и URL для статуса, результатов и отмены.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/kling/kling-3.0/pro/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Cinematic multi-shot of a young American couple celebrating their anniversary at a candlelit terrace dinner in Tuscany at golden hour. Wide establishing shot sweeps over rolling vineyard hills, cypress trees casting long shadows, then cuts to a slow dolly-in on a stone terrace where a woman in an ivory linen dress laughs softly while the man in a navy rolled-sleeve shirt pours red wine. Cut to a tender close-up: their hands interlace across the table, candlelight catching her diamond ring, his thumb gently brushing hers. Cut to a profile two-shot as he leans in and whispers; she smiles, eyes glistening, golden light rim-lighting her loose blonde hair. Final shot: a graceful crane pull-back revealing the terrace, the warm villa, and the sun melting into the Tuscan horizon. Distant church bells, light cricket ambience, soft acoustic guitar. Photoreal skin, fabric texture, wine ripples — shot on Arri Alexa 35, anamorphic lenses, shallow depth of field, premium cinematic color grade."
}'Текущее состояние по 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 URL. Хост должен разрешать серверные запросы (без входа и cookie), без жёсткого лимита и блокировки ботов. Рекомендуется: изображения ≤ 50 МБ (~4K), видео ≤ 100 МБ (~2–5 мин при 720p). Для приватных ресурсов — стабильные или подписанные URL.
{
"type": "object",
"title": "Схема входа",
"required": [
"prompt"
],
"properties": {
"prompt": {
"title": "Промпт",
"description": "Текстовое описание сцены, движения, стиля камеры и атмосферы.",
"type": "string",
"default": "Cinematic multi-shot of a young American couple celebrating their anniversary at a candlelit terrace dinner in Tuscany at golden hour. Wide establishing shot sweeps over rolling vineyard hills, cypress trees casting long shadows, then cuts to a slow dolly-in on a stone terrace where a woman in an ivory linen dress laughs softly while the man in a navy rolled-sleeve shirt pours red wine. Cut to a tender close-up: their hands interlace across the table, candlelight catching her diamond ring, his thumb gently brushing hers. Cut to a profile two-shot as he leans in and whispers; she smiles, eyes glistening, golden light rim-lighting her loose blonde hair. Final shot: a graceful crane pull-back revealing the terrace, the warm villa, and the sun melting into the Tuscan horizon. Distant church bells, light cricket ambience, soft acoustic guitar. Photoreal skin, fabric texture, wine ripples — shot on Arri Alexa 35, anamorphic lenses, shallow depth of field, premium cinematic color grade."
},
"negative_prompt": {
"title": "Отрицательная подсказка",
"description": "Элементы, которые следует исключить из видео.",
"type": "string"
},
"duration": {
"title": "Продолжительность",
"description": "Продолжительность видео в секундах.",
"type": "integer",
"minimum": 3,
"maximum": 15,
"default": 5
},
"aspect_ratio": {
"title": "Соотношение сторон",
"description": "Коэффициент вывода сгенерированного видео.",
"type": "string",
"enum": [
"16:9",
"9:16",
"1:1"
],
"default": "16:9"
},
"cfg_scale": {
"title": "Масштаб CFG",
"description": "Подскажите силу наведения.",
"type": "float",
"minimum": 0,
"maximum": 1,
"default": 0.5
},
"sound": {
"title": "Звук",
"description": "Генерируйте синхронизированный звук вместе с видео.",
"type": "boolean",
"default": true
},
"multi_prompt": {
"title": "Мультиподсказка",
"description": "Дополнительные сегменты подсказок для управления переходами и развитием сцен. Сумма длительностей в multi_prompt должна равняться общей продолжительности видео.",
"type": "array",
"items": {
"prompt": {
"title": "Промпт",
"description": "Дополнительные сегменты подсказок для управления переходами и развитием сцен.",
"type": "string",
"format": "str"
},
"duration": {
"title": "Продолжительность",
"description": "Продолжительность сегмента подсказки в секундах.",
"type": "integer",
"format": "int_slider_with_range",
"minimum": 3,
"maximum": 15,
"default": 5
}
},
"maxItems": 20,
"minItems": 0
},
"shot_type": {
"title": "Тип выстрела",
"description": "Режим редактирования: интеллектуальный (по умолчанию, область определяется автоматически) или настраиваемый.",
"type": "string",
"enum": [
"customize"
],
"default": "customize"
}
}
}{
"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 для создания невероятного искусства.