Используйте API RunComfy для запуска wan-ai/wan-2-6/text-to-video. Допустимые входы и выходы см. в схеме.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/wan-ai/wan-2-6/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Overall Description: A serene and colorful underwater journey through a vibrant coral reef. The atmosphere is peaceful and magical, with beams of sunlight penetrating the deep blue water.\nShot 1 [0-4 seconds]: A tracking shot moves through a colorful coral archway. Schools of small, neon-colored tropical fish dart in unison around the textured coral formations.\nShot 2 [4-7 seconds]: A large sea turtle swims slowly into the frame, its flippers moving gracefully. The texture of its shell is visible in high detail as it passes near the camera.\nShot 3 [7-10 seconds]: The camera tilts up towards the water's surface. Sun rays (God rays) filter through the rippling water, creating a mesmerizing dance of light on the ocean floor."
}'Задайте для переменной окружения 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-6/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Overall Description: A serene and colorful underwater journey through a vibrant coral reef. The atmosphere is peaceful and magical, with beams of sunlight penetrating the deep blue water.\nShot 1 [0-4 seconds]: A tracking shot moves through a colorful coral archway. Schools of small, neon-colored tropical fish dart in unison around the textured coral formations.\nShot 2 [4-7 seconds]: A large sea turtle swims slowly into the frame, its flippers moving gracefully. The texture of its shell is visible in high detail as it passes near the camera.\nShot 3 [7-10 seconds]: The camera tilts up towards the water's surface. Sun rays (God rays) filter through the rippling water, creating a mesmerizing dance of light on the ocean floor."
}'Текущее состояние по 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": "Должно быть менее 1500 символов.",
"type": "string",
"default": "Overall Description: A serene and colorful underwater journey through a vibrant coral reef. The atmosphere is peaceful and magical, with beams of sunlight penetrating the deep blue water.\nShot 1 [0-4 seconds]: A tracking shot moves through a colorful coral archway. Schools of small, neon-colored tropical fish dart in unison around the textured coral formations.\nShot 2 [4-7 seconds]: A large sea turtle swims slowly into the frame, its flippers moving gracefully. The texture of its shell is visible in high detail as it passes near the camera.\nShot 3 [7-10 seconds]: The camera tilts up towards the water's surface. Sun rays (God rays) filter through the rippling water, creating a mesmerizing dance of light on the ocean floor."
},
"audio_url": {
"title": "Аудио",
"description": "`WAV` или `MP3`; 3–30 секунд; менее 15 МБ.",
"type": "string"
},
"aspect_ratio": {
"title": "Разрешение (Ш:В)",
"description": "",
"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)"
],
"default": "1920:1080 (16:9)"
},
"duration": {
"title": "Длительность",
"description": "",
"type": "integer",
"enum": [
5,
10,
15
],
"default": 5
},
"shot_type": {
"title": "Тип кадра",
"description": "`shot_type` имеет приоритет над `prompt`. Например, `single` создает однокадровое видео, даже если в подсказке запрашивается несколько кадров.",
"type": "string",
"enum": [
"multi",
"single"
],
"default": "multi"
},
"negative_prompt": {
"title": "Негативный промпт",
"description": "",
"type": "string"
},
"seed": {
"title": "Сид",
"description": "",
"type": "integer",
"maximum": 2147483647,
"minimum": 0
},
"prompt_extend": {
"title": "Расширение промпта",
"description": "Включает или отключает автоматическое улучшение запроса на создание видео.",
"type": "boolean",
"default": true
},
"audio": {
"title": "Создать аудио",
"description": "",
"type": "boolean",
"default": true
}
}
}{
"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 для создания невероятного искусства.