Используйте API RunComfy для запуска wan-ai/wan-2-6/image-to-video. Допустимые входы и выходы см. в схеме.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/wan-ai/wan-2-6/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Overall Description: This video captures the serene and powerful movement of a shark swimming in the open ocean. The visual style is cinematic and documentary-like, emphasizing the clarity of the blue water and the dramatic interplay of sunlight piercing through the surface (God rays). The atmosphere is tense yet majestic.\nShot 1 [0-4 seconds]: A wide, side-profile tracking shot follows the shark gliding effortlessly through the deep blue water. Sunlight filters down from the surface, creating dancing patterns of light on shark's grey skin. The water is crystal clear, with bubbles trailing slightly behind.\nShot 2 [4-7 seconds]: The camera angles up towards the surface (low angle shot). The shark swims directly overhead, its silhouette dark and distinct against the bright, shimmering surface of the water and the sun's glare.\nShot 3 [7-10 seconds]: A close-up shot focuses on shark's face and gills. The shark turns slightly towards the camera, revealing a piercing gaze, before propelling itself forward with a strong tail movement, disappearing into the deep blue gloom of the ocean.",
"img_url": "https://playgrounds-storage-public.runcomfy.net/tools/7276/media-files/input-1-1.png"
}'Задайте для переменной окружения 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/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Overall Description: This video captures the serene and powerful movement of a shark swimming in the open ocean. The visual style is cinematic and documentary-like, emphasizing the clarity of the blue water and the dramatic interplay of sunlight piercing through the surface (God rays). The atmosphere is tense yet majestic.\nShot 1 [0-4 seconds]: A wide, side-profile tracking shot follows the shark gliding effortlessly through the deep blue water. Sunlight filters down from the surface, creating dancing patterns of light on shark's grey skin. The water is crystal clear, with bubbles trailing slightly behind.\nShot 2 [4-7 seconds]: The camera angles up towards the surface (low angle shot). The shark swims directly overhead, its silhouette dark and distinct against the bright, shimmering surface of the water and the sun's glare.\nShot 3 [7-10 seconds]: A close-up shot focuses on shark's face and gills. The shark turns slightly towards the camera, revealing a piercing gaze, before propelling itself forward with a strong tail movement, disappearing into the deep blue gloom of the ocean.",
"img_url": "https://playgrounds-storage-public.runcomfy.net/tools/7276/media-files/input-1-1.png"
}'Текущее состояние по 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",
"img_url"
],
"properties": {
"prompt": {
"title": "Промпт",
"description": "Длина должна быть менее 1500 символов.",
"type": "string",
"default": "Overall Description: This video captures the serene and powerful movement of a shark swimming in the open ocean. The visual style is cinematic and documentary-like, emphasizing the clarity of the blue water and the dramatic interplay of sunlight piercing through the surface (God rays). The atmosphere is tense yet majestic.\nShot 1 [0-4 seconds]: A wide, side-profile tracking shot follows the shark gliding effortlessly through the deep blue water. Sunlight filters down from the surface, creating dancing patterns of light on shark's grey skin. The water is crystal clear, with bubbles trailing slightly behind.\nShot 2 [4-7 seconds]: The camera angles up towards the surface (low angle shot). The shark swims directly overhead, its silhouette dark and distinct against the bright, shimmering surface of the water and the sun's glare.\nShot 3 [7-10 seconds]: A close-up shot focuses on shark's face and gills. The shark turns slightly towards the camera, revealing a piercing gaze, before propelling itself forward with a strong tail movement, disappearing into the deep blue gloom of the ocean."
},
"img_url": {
"title": "Изображение",
"description": "Формат изображения должен быть: jpg, jpeg, png, bmp, webp. Размер файла должен быть менее 10 МБ.",
"type": "string",
"validations": [
{
"validation_rule": "width_pixels>",
"validation_value": 360,
"validation_error": "Ширина и высота загруженного изображения должны превышать 360 пикселей."
},
{
"validation_rule": "height_pixels>",
"validation_value": 360,
"validation_error": "Ширина и высота загруженного изображения должны превышать 360 пикселей."
},
{
"validation_rule": "width_pixels<",
"validation_value": 2000,
"validation_error": "Ширина и высота загруженного изображения не должны превышать 2000 пикселей."
},
{
"validation_rule": "height_pixels<",
"validation_value": 2000,
"validation_error": "Ширина и высота загруженного изображения не должны превышать 2000 пикселей."
}
],
"default": "https://playgrounds-storage-public.runcomfy.net/tools/7276/media-files/input-1-1.png"
},
"audio_url": {
"title": "Аудио",
"description": "Формат аудио должен быть: wav, mp3. Продолжительность аудио должна быть от 3 до 30 секунд. Размер файла должен быть менее 15 МБ.",
"type": "string"
},
"duration": {
"title": "Длительность",
"description": "",
"type": "integer",
"enum": [
5,
10,
15
],
"default": 5
},
"resolution": {
"title": "Разрешение",
"description": "",
"type": "string",
"enum": [
"720P",
"1080P"
],
"default": "720P"
},
"shot_type": {
"title": "Тип съёмки",
"description": "shot_type > prompt. Например, если shot_type установлен на single, Wan 2.6 генерирует видео с одним кадром, даже если промпт запрашивает многокадровое видео.",
"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 для создания невероятного искусства.