Use a API RunComfy para executar google/gemini-3-pro-image-preview/text-to-image. Para entradas e saídas aceitas, consulte o esquema.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/google/gemini-3-pro-image-preview/text-to-image \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A pair of mannequin legs dressed in sparkling glitter socks protrudes boldly from a voluminous mountain of cotton candy, its delicate, spun sugar texture softly aglow under a focused studio spotlight. Wisps of ethereal fog swirl gently around the scene, diffusing the bright, cool light and lending a dreamlike haze that contrasts with the sharp shine on the socks' glistening threads. The smooth, featureless plastic of the legs reflects the light with subtle sheen, emphasizing their artificial stillness amid the sweet, fluffy chaos surrounding them. The composition centers tightly on this surreal juxtaposition, capturing the fine details of the glitter's shimmer and the airy cotton candy's spun texture in crisp, tactile clarity, bathed in cool white and pale pink hues that meld into a softly blurred background."
}'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/google/gemini-3-pro-image-preview/text-to-image \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A pair of mannequin legs dressed in sparkling glitter socks protrudes boldly from a voluminous mountain of cotton candy, its delicate, spun sugar texture softly aglow under a focused studio spotlight. Wisps of ethereal fog swirl gently around the scene, diffusing the bright, cool light and lending a dreamlike haze that contrasts with the sharp shine on the socks' glistening threads. The smooth, featureless plastic of the legs reflects the light with subtle sheen, emphasizing their artificial stillness amid the sweet, fluffy chaos surrounding them. The composition centers tightly on this surreal juxtaposition, capturing the fine details of the glitter's shimmer and the airy cotton candy's spun texture in crisp, tactile clarity, bathed in cool white and pale pink hues that meld into a softly blurred background."
}'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 imagem ou imagens a serem geradas.",
"type": "string",
"default": "A pair of mannequin legs dressed in sparkling glitter socks protrudes boldly from a voluminous mountain of cotton candy, its delicate, spun sugar texture softly aglow under a focused studio spotlight. Wisps of ethereal fog swirl gently around the scene, diffusing the bright, cool light and lending a dreamlike haze that contrasts with the sharp shine on the socks' glistening threads. The smooth, featureless plastic of the legs reflects the light with subtle sheen, emphasizing their artificial stillness amid the sweet, fluffy chaos surrounding them. The composition centers tightly on this surreal juxtaposition, capturing the fine details of the glitter's shimmer and the airy cotton candy's spun texture in crisp, tactile clarity, bathed in cool white and pale pink hues that meld into a softly blurred background."
},
"aspect_ratio": {
"title": "Proporção (L:A)",
"description": "Proporção das imagens geradas. Escolha um dos 10 valores listados.",
"type": "string",
"enum": [
"21:9",
"16:9",
"3:2",
"4:3",
"5:4",
"1:1",
"4:5",
"3:4",
"2:3",
"9:16"
],
"default": "16:9"
},
"resolution": {
"title": "Resolução",
"description": "Resolução de saída. Valores permitidos: `1K`, `2K` e `4K`.",
"type": "string",
"enum": [
"1K",
"2K",
"4K"
],
"default": "1K"
},
"output_format": {
"title": "Formato de saída",
"description": "Formato de imagem de saída. Valores permitidos: `jpeg`, `png` e `webp`; padrão: `png`.",
"type": "string",
"enum": [
"jpeg",
"png",
"webp"
],
"default": "png"
},
"num_images": {
"title": "Número de imagens",
"description": "Número de imagens a serem geradas. Faixa permitida: 1 a 4; padrão: 1.",
"type": "integer",
"default": 1,
"minimum": 1,
"maximum": 4
},
"sync_mode": {
"title": "Modo síncrono",
"description": "Quando `true`, a mídia é retornada como um URI de dados e seus dados de saída não são armazenados no histórico de solicitações. O padrão é `false`.",
"type": "boolean",
"default": false
}
}
}{
"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.