Use a API RunComfy para executar wan-ai/wan-2-6/image-to-video. Para entradas e saídas aceitas, consulte o esquema.
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"
}'Defina a variável de ambiente YOUR_API_TOKEN com sua chave de API (gerenciamento no Perfil) e inclua em cada solicitação um token Bearer no cabeçalho Authorization : Authorization: Bearer $YOUR_API_TOKEN.
Envie um trabalho de geração assíncrono e receba imediatamente um request_id e URLs para status, resultados e cancelamento.
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"
}'Obtém o estado atual de um request_id ("in_queue", "in_progress", "completed" ou "cancelled").
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/status \
--header "Authorization: Bearer <token>"Obtém as saídas finais e metadados do request_id; se o trabalho não estiver concluído, a resposta retorna o estado atual para continuar o polling.
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/result \
--header "Authorization: Bearer <token>"Cancela um trabalho na fila por request_id; trabalhos em andamento não podem ser cancelados.
curl --request POST \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/cancel \
--header "Authorization: Bearer <token>"Forneça uma URL HTTPS publicamente acessível. O host deve permitir buscas no servidor (sem login/cookies), sem limite de taxa agressivo ou bloqueio de bots. Recomendado: imagens ≤ 50 MB (~4K), vídeos ≤ 100 MB (~2–5 min em 720p). Para ativos privados, URLs estáveis ou pré-assinadas.
{
"type": "object",
"title": "Esquema de entrada",
"required": [
"prompt",
"img_url"
],
"properties": {
"prompt": {
"title": "Prompt",
"description": "O comprimento deve ser menor que 1500 caracteres.",
"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": "Imagem",
"description": "O formato de imagem deve ser: jpg, jpeg, png, bmp, webp. O tamanho do arquivo deve ser menor que 10 MB.",
"type": "string",
"validations": [
{
"validation_rule": "width_pixels>",
"validation_value": 360,
"validation_error": "A largura e altura da imagem carregada devem exceder 360 pixels."
},
{
"validation_rule": "height_pixels>",
"validation_value": 360,
"validation_error": "A largura e altura da imagem carregada devem exceder 360 pixels."
},
{
"validation_rule": "width_pixels<",
"validation_value": 2000,
"validation_error": "A largura e altura da imagem carregada não devem exceder 2000 pixels."
},
{
"validation_rule": "height_pixels<",
"validation_value": 2000,
"validation_error": "A largura e altura da imagem carregada não devem exceder 2000 pixels."
}
],
"default": "https://playgrounds-storage-public.runcomfy.net/tools/7276/media-files/input-1-1.png"
},
"audio_url": {
"title": "Áudio",
"description": "O formato de áudio deve ser: wav, mp3. A duração do áudio deve estar entre 3s e 30s. O tamanho do arquivo deve ser menor que 15 MB.",
"type": "string"
},
"duration": {
"title": "Duração",
"description": "",
"type": "integer",
"enum": [
5,
10,
15
],
"default": 5
},
"resolution": {
"title": "Resolução",
"description": "",
"type": "string",
"enum": [
"720P",
"1080P"
],
"default": "720P"
},
"shot_type": {
"title": "Tipo de tomada",
"description": "shot_type > prompt. Por exemplo, se shot_type estiver definido como \"single\", o Wan 2.6 gera um vídeo de tomada única mesmo que o prompt solicite um vídeo de múltiplas tomadas.",
"type": "string",
"enum": [
"multi",
"single"
],
"default": "multi"
},
"negative_prompt": {
"title": "Prompt negativo",
"description": "",
"type": "string"
},
"seed": {
"title": "Semente",
"description": "",
"type": "integer",
"maximum": 2147483647,
"minimum": 0
},
"prompt_extend": {
"title": "Expandir prompt",
"description": "Se o prompt de geração de vídeo deve ser aprimorado.",
"type": "boolean",
"default": true
},
"audio": {
"title": "Gerar áudio",
"description": "",
"type": "boolean",
"default": true
}
}
}{
"output": {
"type": "object",
"properties": {
"image": {
"type": "string",
"format": "uri",
"description": "URL de imagem única"
},
"video": {
"type": "string",
"format": "uri",
"description": "URL de vídeo único"
},
"images": {
"type": "array",
"description": "várias URLs de imagem",
"items": {
"type": "string",
"format": "uri"
}
},
"videos": {
"type": "array",
"description": "várias URLs de vídeo",
"items": {
"type": "string",
"format": "uri"
}
}
}
}
}RunComfy é a principal ComfyUI plataforma, oferecendo ComfyUI online ambiente e serviços, juntamente com fluxos de trabalho do ComfyUI apresentando visuais impressionantes. RunComfy também oferece AI Models, permitindo que artistas utilizem as mais recentes ferramentas de AI para criar arte incrível.