Используйте API RunComfy для запуска wan-ai/wan-2-5/text-to-video. Допустимые входы и выходы см. в схеме.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/wan-ai/wan-2-5/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Olympic swimming pool in television broadcast style, showing a relaxed capybara competing in freestyle swimming. It moves forward with an extremely calm expression and slow, elegant swimming strokes, completely unaffected by the tense atmosphere around, as if enjoying a spa session. The audience is amused by its zen-like attitude, while the commentator marvels at its \"zen swimming technique.\" Audio: gentle paddling sounds, audience chuckles, commentator's philosophical commentary."
}'Задайте для переменной окружения 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/wan-ai/wan-2-5/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Olympic swimming pool in television broadcast style, showing a relaxed capybara competing in freestyle swimming. It moves forward with an extremely calm expression and slow, elegant swimming strokes, completely unaffected by the tense atmosphere around, as if enjoying a spa session. The audience is amused by its zen-like attitude, while the commentator marvels at its \"zen swimming technique.\" Audio: gentle paddling sounds, audience chuckles, commentator's philosophical commentary."
}'Текущее состояние по 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": "Обязательное текстовое описание создаваемого видео; должно быть менее 2000 символов.",
"type": "string",
"default": "Olympic swimming pool in television broadcast style, showing a relaxed capybara competing in freestyle swimming. It moves forward with an extremely calm expression and slow, elegant swimming strokes, completely unaffected by the tense atmosphere around, as if enjoying a spa session. The audience is amused by its zen-like attitude, while the commentator marvels at its \"zen swimming technique.\" Audio: gentle paddling sounds, audience chuckles, commentator's philosophical commentary."
},
"audio_url": {
"title": "Аудио",
"description": "Дополнительный URL-адрес аудио WAV или MP3. Аудио должно длиться 3–30 секунд, а размер файла не должен превышать 15 МБ.",
"type": "string",
"validations": [
{
"validation_rule": "file_size_mb<",
"validation_value": 15,
"validation_error": "Размер файла должен быть меньше 15 МБ."
}
]
},
"aspect_ratio": {
"title": "Разрешение (Ш:В)",
"description": "Выходные размеры и соотношение сторон. Выберите один из 13 перечисленных пресетов; по умолчанию: `832:480 (16:9)`.",
"type": "string",
"enum": [
"1920:1080 (16:9)",
"1080:1920 (9:16)",
"1440:1440 (1:1)",
"1632:1248 (4:3)",
"1248:1632 (3:4)",
"1280:720 (16:9)",
"720:1280 (9:16)",
"960:960 (1:1)",
"1088:832 (4:3)",
"832:1088 (3:4)",
"480:832 (9:16)",
"832:480 (16:9)",
"624:624 (1:1)"
],
"default": "832:480 (16:9)"
},
"duration": {
"title": "Длительность",
"description": "Продолжительность видео в секундах. Выберите `5` или `10`; по умолчанию: `5`.",
"type": "integer",
"enum": [
5,
10
],
"default": 5
},
"negative_prompt": {
"title": "Негативный промпт",
"description": "Необязательное описание визуальных элементов, которых следует избегать.",
"type": "string",
"default": ""
}
}
}{
"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 для создания невероятного искусства.