Use a API RunComfy para executar kling/kling-3.0/standard/image-to-video. Para entradas e saídas aceitas, consulte o esquema.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/kling/kling-3.0/standard/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Bring this still photograph to life with cinematic motion. The young American woman in a flowing white linen sundress stands on a sunlit Pacific Coast cliff at golden hour: her chestnut hair drifts gently in the ocean breeze, the hem of her dress flutters, and she turns her head and breaks into a soft smile as warm sunlight catches her freckles. Behind her, foamy turquoise waves roll and crash against the rocks below, seabirds glide past, and tall coastal grass sways. The camera slowly dollies in from a wide shot to a tender medium close-up, a subtle parallax revealing the depth of the cliffside. Natural ambient sound: gentle Pacific surf, distant gulls, a soft breeze through the grass, faint acoustic guitar in the background. Photoreal skin and fabric textures, hair strand detail, realistic water physics, golden-hour rim lighting, lens flare, shot on Arri Alexa 35, 50mm anamorphic, shallow depth of field, premium cinematic color grade.",
"start_image_url": "https://playgrounds-storage-public.runcomfy.net/tools/7349/media-files/input.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/kling/kling-3.0/standard/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Bring this still photograph to life with cinematic motion. The young American woman in a flowing white linen sundress stands on a sunlit Pacific Coast cliff at golden hour: her chestnut hair drifts gently in the ocean breeze, the hem of her dress flutters, and she turns her head and breaks into a soft smile as warm sunlight catches her freckles. Behind her, foamy turquoise waves roll and crash against the rocks below, seabirds glide past, and tall coastal grass sways. The camera slowly dollies in from a wide shot to a tender medium close-up, a subtle parallax revealing the depth of the cliffside. Natural ambient sound: gentle Pacific surf, distant gulls, a soft breeze through the grass, faint acoustic guitar in the background. Photoreal skin and fabric textures, hair strand detail, realistic water physics, golden-hour rim lighting, lens flare, shot on Arri Alexa 35, 50mm anamorphic, shallow depth of field, premium cinematic color grade.",
"start_image_url": "https://playgrounds-storage-public.runcomfy.net/tools/7349/media-files/input.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",
"start_image_url"
],
"properties": {
"prompt": {
"title": "Prompt",
"description": "",
"type": "string",
"default": "Bring this still photograph to life with cinematic motion. The young American woman in a flowing white linen sundress stands on a sunlit Pacific Coast cliff at golden hour: her chestnut hair drifts gently in the ocean breeze, the hem of her dress flutters, and she turns her head and breaks into a soft smile as warm sunlight catches her freckles. Behind her, foamy turquoise waves roll and crash against the rocks below, seabirds glide past, and tall coastal grass sways. The camera slowly dollies in from a wide shot to a tender medium close-up, a subtle parallax revealing the depth of the cliffside. Natural ambient sound: gentle Pacific surf, distant gulls, a soft breeze through the grass, faint acoustic guitar in the background. Photoreal skin and fabric textures, hair strand detail, realistic water physics, golden-hour rim lighting, lens flare, shot on Arri Alexa 35, 50mm anamorphic, shallow depth of field, premium cinematic color grade."
},
"multi_prompt": {
"title": "Segmentos de vários prompts",
"description": "Fornece vários segmentos de prompt para transições de cena. A soma de todas as durações dos segmentos deve ser igual à duração total do vídeo.",
"type": "array",
"items": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"format": "str"
},
"duration": {
"type": "integer",
"format": "int_slider_with_range",
"minimum": 3,
"maximum": 15,
"default": 5
}
}
},
"maxItems": 20,
"minItems": 0
},
"start_image_url": {
"title": "Imagem inicial",
"description": "Imagem inicial do vídeo. Suporta formatos jpg, jpeg, png, bmp, webp.",
"type": "string",
"default": "https://playgrounds-storage-public.runcomfy.net/tools/7349/media-files/input.png"
},
"duration": {
"title": "Duração",
"description": "Duração total do vídeo gerado em segundos.",
"type": "integer",
"minimum": 3,
"maximum": 15,
"default": 10
},
"generate_audio": {
"title": "Gerar áudio",
"description": "Habilite esta opção para gerar áudio para o vídeo.",
"type": "boolean",
"default": true
},
"elements": {
"title": "Elementos",
"description": "Ativos de entrada usados para geração, incluindo imagens de referência e segmentos de vídeo.",
"type": "array",
"items": {
"type": "object",
"properties": {
"frontal_image_url": {
"type": "string",
"format": "image_uri",
"description": "Referência de imagem frontal para o assunto."
},
"reference_image_urls": {
"type": "array",
"format": "image_uris",
"items": {
"type": "string",
"format": "image_uri"
},
"description": "URLs de imagem de referência adicionais usados para orientar a renderização."
},
"video_url": {
"type": "string",
"format": "video_uri",
"description": "Fonte de vídeo opcional usada para referência de movimento."
}
}
},
"minItems": 0,
"maxItems": 3
},
"shot_type": {
"title": "Tipo de tiro",
"description": "Define como a tomada da câmera ou o enquadramento da cena são tratados.",
"type": "string",
"enum": [
"customize"
],
"default": "customize"
},
"negative_prompt": {
"title": "Alerta negativo",
"description": "",
"type": "string"
},
"cfg_scale": {
"title": "Escala de Orientação",
"description": "Escala de orientação sem classificador que controla a adesão ao prompt.",
"type": "float",
"minimum": 0,
"maximum": 1,
"default": 0.5
}
}
}{
"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.