Use a API RunComfy para executar wan-ai/wan-2-5/text-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-5/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Olympic swimming pool in television broadcast style, showing a relaxed capybara competing in freestyle swimming. It moves forward with an extremely calm expression and slow, elegant swimming strokes, completely unaffected by the tense atmosphere around, as if enjoying a spa session. The audience is amused by its zen-like attitude, while the commentator marvels at its \"zen swimming technique.\" Audio: gentle paddling sounds, audience chuckles, commentator's philosophical commentary."
}'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-5/text-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Olympic swimming pool in television broadcast style, showing a relaxed capybara competing in freestyle swimming. It moves forward with an extremely calm expression and slow, elegant swimming strokes, completely unaffected by the tense atmosphere around, as if enjoying a spa session. The audience is amused by its zen-like attitude, while the commentator marvels at its \"zen swimming technique.\" Audio: gentle paddling sounds, audience chuckles, commentator's philosophical commentary."
}'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 obrigatória do vídeo a ser gerado; deve ter menos de 2.000 caracteres.",
"type": "string",
"default": "Olympic swimming pool in television broadcast style, showing a relaxed capybara competing in freestyle swimming. It moves forward with an extremely calm expression and slow, elegant swimming strokes, completely unaffected by the tense atmosphere around, as if enjoying a spa session. The audience is amused by its zen-like attitude, while the commentator marvels at its \"zen swimming technique.\" Audio: gentle paddling sounds, audience chuckles, commentator's philosophical commentary."
},
"audio_url": {
"title": "Áudio",
"description": "URL de áudio WAV ou MP3 opcional. O áudio deve ter de 3 a 30 segundos de duração e o arquivo deve ter menos de 15 MB.",
"type": "string",
"validations": [
{
"validation_rule": "file_size_mb<",
"validation_value": 15,
"validation_error": "O arquivo deve ter menos de 15 MB."
}
]
},
"aspect_ratio": {
"title": "Resolução (L:A)",
"description": "Dimensões de saída e proporção. Escolha uma das 13 predefinições listadas; padrão: `832:480 (16:9)`.",
"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)",
"480:832 (9:16)",
"832:480 (16:9)",
"624:624 (1:1)"
],
"default": "832:480 (16:9)"
},
"duration": {
"title": "Duração",
"description": "Duração do vídeo em segundos. Escolha `5` ou `10`; padrão: `5`.",
"type": "integer",
"enum": [
5,
10
],
"default": 5
},
"negative_prompt": {
"title": "Prompt negativo",
"description": "Descrição opcional de elementos visuais a evitar.",
"type": "string",
"default": ""
}
}
}{
"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.