Use a API RunComfy para executar kling/kling-3.0/standard/text-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/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Cinematic multi-shot of a young American father teaching his 6-year-old daughter to ride a bike on a sun-dappled suburban street in autumn. Wide establishing shot of the leafy neighborhood with Craftsman-style houses, then cut to a low tracking shot following the wobbling pink bike as the father runs alongside holding the seat, his blue flannel shirt fluttering. Cut to a close-up of the girl's face, golden braids whipping in the wind, her wide blue eyes shifting from nervous to joyful as she breaks into laughter. Final shot: a slow-motion crane pull-back as he lets go and she pedals freely down the street, golden hour light, lens flares, warm cinematic color grade, shot on 35mm film, shallow depth of field."
}'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/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Cinematic multi-shot of a young American father teaching his 6-year-old daughter to ride a bike on a sun-dappled suburban street in autumn. Wide establishing shot of the leafy neighborhood with Craftsman-style houses, then cut to a low tracking shot following the wobbling pink bike as the father runs alongside holding the seat, his blue flannel shirt fluttering. Cut to a close-up of the girl's face, golden braids whipping in the wind, her wide blue eyes shifting from nervous to joyful as she breaks into laughter. Final shot: a slow-motion crane pull-back as he lets go and she pedals freely down the street, golden hour light, lens flares, warm cinematic color grade, shot on 35mm film, shallow depth of field."
}'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"
],
"properties": {
"prompt": {
"title": "Prompt",
"description": "Descrição de texto da cena, movimento, estilo da câmera e atmosfera.",
"type": "string",
"default": "Cinematic multi-shot of a young American father teaching his 6-year-old daughter to ride a bike on a sun-dappled suburban street in autumn. Wide establishing shot of the leafy neighborhood with Craftsman-style houses, then cut to a low tracking shot following the wobbling pink bike as the father runs alongside holding the seat, his blue flannel shirt fluttering. Cut to a close-up of the girl's face, golden braids whipping in the wind, her wide blue eyes shifting from nervous to joyful as she breaks into laughter. Final shot: a slow-motion crane pull-back as he lets go and she pedals freely down the street, golden hour light, lens flares, warm cinematic color grade, shot on 35mm film, shallow depth of field."
},
"negative_prompt": {
"title": "Alerta negativo",
"description": "Elementos a serem excluídos do vídeo.",
"type": "string"
},
"duration": {
"title": "Duração",
"description": "Duração do vídeo em segundos.",
"type": "integer",
"minimum": 3,
"maximum": 15,
"default": 5
},
"aspect_ratio": {
"title": "Proporção",
"description": "Proporção de saída do vídeo gerado.",
"type": "string",
"enum": [
"16:9",
"9:16",
"1:1"
],
"default": "16:9"
},
"cfg_scale": {
"title": "Escala CFG",
"description": "Força de orientação imediata.",
"type": "float",
"minimum": 0,
"maximum": 1,
"default": 0.5
},
"sound": {
"title": "Som",
"description": "Gere som sincronizado junto com o vídeo.",
"type": "boolean",
"default": true
},
"shot_type": {
"title": "Tipo de tiro",
"description": "Modo de edição: inteligente (padrão, escopo autodeterminado) ou personalizado.",
"type": "string",
"enum": [
"intelligent",
"customize"
],
"default": "intelligent"
},
"multi_prompt": {
"title": "Solicitação múltipla",
"description": "Segmentos de prompt adicionais para orientar transições e progressões de cena. A soma das durações em multi_prompt deve ser igual à duração total do vídeo",
"type": "array",
"items": {
"prompt": {
"title": "Prompt",
"description": "Segmentos de prompt adicionais para orientar transições e progressões de cena.",
"type": "string",
"format": "str"
},
"duration": {
"title": "Duração",
"description": "Duração do segmento de prompt em segundos.",
"type": "integer",
"format": "int_slider_with_range",
"minimum": 3,
"maximum": 15,
"default": 5
}
},
"maxItems": 20,
"minItems": 0
}
}
}{
"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.