Use a API RunComfy para executar wan-ai/wan-2-6/text-to-image. 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/text-to-image \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Font design showcasing charming 3D plush yellow text 'Wan 2.6' crafted with ultra-soft, fluffy fur, featuring intricate, high-definition details and realistic texture. Each letter appears tactile, plump, and velvety. Set against a sleek dark gradient background with subtle lighting to enhance depth and contrast, rendered in stunning 16K resolution. Emphasizes ultimate cuteness, warmth, and the inviting softness of the fur."
}'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/text-to-image \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Font design showcasing charming 3D plush yellow text 'Wan 2.6' crafted with ultra-soft, fluffy fur, featuring intricate, high-definition details and realistic texture. Each letter appears tactile, plump, and velvety. Set against a sleek dark gradient background with subtle lighting to enhance depth and contrast, rendered in stunning 16K resolution. Emphasizes ultimate cuteness, warmth, and the inviting softness of the fur."
}'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": "O prompt deve ter menos de 2.000 caracteres.",
"type": "string",
"default": "Font design showcasing charming 3D plush yellow text 'Wan 2.6' crafted with ultra-soft, fluffy fur, featuring intricate, high-definition details and realistic texture. Each letter appears tactile, plump, and velvety. Set against a sleek dark gradient background with subtle lighting to enhance depth and contrast, rendered in stunning 16K resolution. Emphasizes ultimate cuteness, warmth, and the inviting softness of the fur."
},
"image_url": {
"title": "Imagem de referência",
"description": "Imagem de referência opcional. Formatos aceitos: JPEG, JPG, PNG (sem canal alfa), BMP e WEBP. Cada lado deve ter entre 384 e 5.000 px. Tamanho máximo: 10 MB.",
"type": "string",
"validations": [
{
"validation_rule": "file_size_mb<=",
"validation_value": 10,
"validation_error": "O arquivo deve ter no máximo 10 MB."
},
{
"validation_rule": "width_pixels>=",
"validation_value": 384,
"validation_error": "A largura e a altura da imagem enviada devem ser de pelo menos 384 pixels."
},
{
"validation_rule": "height_pixels>=",
"validation_value": 384,
"validation_error": "A largura e a altura da imagem enviada devem ser de pelo menos 384 pixels."
},
{
"validation_rule": "width_pixels<=",
"validation_value": 5000,
"validation_error": "A largura e a altura da imagem enviada não podem ultrapassar 5000 pixels."
},
{
"validation_rule": "height_pixels<=",
"validation_value": 5000,
"validation_error": "A largura e a altura da imagem enviada não podem ultrapassar 5000 pixels."
}
]
},
"negative_prompt": {
"title": "Prompt negativo",
"description": "Descreva o conteúdo que deve ser evitado na imagem gerada.",
"type": "string",
"maxLength": 500
},
"image_size": {
"title": "Proporção (L:A)",
"description": "",
"type": "string",
"enum": [
"1024*1024 (1:1)",
"800*1200 (2:3)",
"1200*800 (3:2)",
"960*1280 (3:4)",
"1280*960 (4:3)",
"720*1280 (9:16)",
"1280*720 (16:9)",
"1344*576 (21:9)"
],
"default": "1024*1024 (1:1)"
},
"max_images": {
"title": "Número máximo de imagens",
"description": "Número máximo de imagens a gerar. O modelo determina a quantidade real, que pode ser menor que o valor definido. Por exemplo, ao escolher 5, ele pode gerar apenas 3 imagens dependendo do conteúdo.",
"type": "integer",
"default": 1,
"minimum": 1,
"maximum": 5
},
"seed": {
"title": "Seed",
"description": "",
"type": "integer",
"default": 0,
"minimum": 0,
"maximum": 2147483647
}
}
}{
"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.