PopNowDocs da API
Conteúdo principal

Referência da API do FLUX 3 Klein

FLUX 3 Klein rápido: imagens e edições com várias referências em 1K ou 2K

Com uma única chave de API da PopNow você chama o FLUX 3 Klein direto do seu código. Aqui estão os IDs de modelo a enviar, cada campo de entrada aceito, quanto custa cada requisição em USD e um exemplo que você cola no terminal e roda.

As descrições dos parâmetros vêm do schema de entrada do modelo e estão disponíveis só em inglês.

Resumo

Desenvolvedor
Black Forest Labs
Resultado
Imagem
A partir de
$0.012 USD por imagem
Tempo médio
cerca de 17 s

Os preços são exibidos em USD e os valores são descontados do seu saldo PopNow. Ao aceitar a tarefa, o valor máximo é reservado; ao concluir, o uso real é cobrado e o restante liberado. Tarefas com falha não são cobradas. Consulte POST /api/v1/jobs/quote para obter uma cotação exata antes de executar.

Criar imagem

black-forest-labs/flux-3-klein/text-to-image

Preço

OpçãoUSD
1k$0.012 por imagem
2k$0.048 por imagem

Parâmetros

CampoTipoPadrãoValores aceitosPara que serve
promptObrigatóriostring—até 5.000 caracteresDescribe the subject, setting, light and style in plain sentences.
aspect_ratioOpcionalstring1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9, 9:21, 2:1, 1:2, 3:1, … (+2)Output aspect ratio; custom lets you set width and height.
resolutionOpcionalstring1k1k, 2kOutput size tier: 1k is about one megapixel, 2k about four.
widthOpcionalinteger—de 256 a 1024Output width in pixels when aspect_ratio is custom, 256 to 1024 (1024 if left out); height works the same way. The price still follows resolution.
heightOpcionalinteger—de 256 a 1024Output height in pixels when aspect_ratio is custom, 256 to 1024 (1024 if left out); width works the same way. The price still follows resolution.
enable_prompt_expansionOpcionalbooleanfalse—Rewrite the prompt into a fuller description before generating. Off by default, so the prompt is followed word for word.
output_formatOpcionalstringjpegjpeg, png, webpFile format of the returned image.
seedOpcionalinteger—de 0 a 2147483647Random seed for controlled comparisons.

Exemplo de requisição

Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.

POST /api/v1/jobs/createTask?wait=60
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "black-forest-labs/flux-3-klein/text-to-image",
  "input": {
    "prompt": "A cozy reading nook beside a rain-streaked window, warm lamp light, a sleeping orange cat on a knitted blanket, soft film grain",
    "resolution": "1k"
  }
}'

A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Editar imagem

black-forest-labs/flux-3-klein/edit

Preço

OpçãoUSD
1k$0.0192 por imagem
2k$0.0768 por imagem

Parâmetros

CampoTipoPadrãoValores aceitosPara que serve
promptObrigatóriostring—até 5.000 caracteresSay what to change and what must stay the same; name each source as <ref_image_1>, <ref_image_2>.
image_urlsObrigatórioarray<string (uri)>—até 10 itensOne to ten source images, in the order your prompt refers to them. The second and third each raise the price a little; more do not.
aspect_ratioOpcionalstringautoauto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9, 9:21, 2:1, 1:2, … (+3)Output aspect ratio; auto keeps the shape of the first source image, custom lets you set width and height.
resolutionOpcionalstring1k1k, 2kOutput size tier: 1k is about one megapixel, 2k about four.
widthOpcionalinteger—de 256 a 1024Output width in pixels when aspect_ratio is custom, 256 to 1024 (1024 if left out); height works the same way. The price still follows resolution.
heightOpcionalinteger—de 256 a 1024Output height in pixels when aspect_ratio is custom, 256 to 1024 (1024 if left out); width works the same way. The price still follows resolution.
enable_prompt_expansionOpcionalbooleanfalse—Rewrite the prompt into a fuller description before generating. Off by default, so the prompt is followed word for word.
output_formatOpcionalstringjpegjpeg, png, webpFile format of the returned image.
seedOpcionalinteger—de 0 a 2147483647Random seed for controlled comparisons.

Exemplo de requisição

Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.

O exemplo usa arquivos de amostra da PopNow em image_urls. Troque pelos seus próprios links HTTPS públicos, uploads ou assets salvos.

POST /api/v1/jobs/createTask?wait=60
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "black-forest-labs/flux-3-klein/edit",
  "input": {
    "prompt": "Change the orange jacket to deep forest green and add soft golden-hour light; keep the face, pose and background unchanged",
    "image_urls": [
      "https://media.popnow.ai/influencer/examples/marco.webp"
    ],
    "resolution": "1k"
  }
}'

A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Próximos passos

Nesta página