PopNowDocs de la API
Contenido principal

Referencia de la API de FLUX.2 Klein 9B LoRA

FLUX.2 Klein 9B rápido que carga hasta tres de tus LoRA

Con una sola clave de API de PopNow puedes llamar a FLUX.2 Klein 9B LoRA desde tu propio código. Aquí tienes los ID de modelo que debes enviar, cada campo de entrada que acepta, cuánto cuesta cada solicitud en USD y una petición que puedes pegar tal cual en la terminal.

Las descripciones de los parámetros vienen del esquema de entrada del modelo y solo están en inglés.

De un vistazo

Creado por
Black Forest Labs
Resultado
Imagen
Desde
$0.018 USD por imagen
Tiempo habitual
unos 17 s

Los precios se muestran en USD y se cobran de tu saldo de PopNow. Al aceptar la tarea se reserva el importe máximo; al terminar se cobra el uso real y se libera el resto. Las tareas fallidas no se cobran. Consulta POST /api/v1/jobs/quote para obtener un presupuesto exacto antes de ejecutar.

Crear imagen

black-forest-labs/flux-2-klein-9b-lora/text-to-image

Precio

OpciónUSD
Predeterminado$0.018 por imagen

Parámetros

CampoTipoValor predeterminadoValores admitidosPara qué sirve
promptObligatoriostring—hasta 5000 caracteresDescribe the subject, setting, light and style in plain sentences. Put a LoRA trigger phrase first.
aspect_ratioOpcionalstring1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21Output aspect ratio.
resolutionOpcionalstring1k1k, 2kOutput size tier: 1k is about one megapixel, 2k is 2048 pixels on the long side.
lorasOpcionalarray<object>[]hasta 3 elementosUp to three LoRA weight files trained for FLUX.2 [klein] 9B (the distilled or the Base build), each with its own strength.
seedOpcionalinteger—de 0 a 2147483647Random seed for controlled comparisons.

Solicitud de ejemplo

Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en 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-2-klein-9b-lora/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"
  }
}'

La respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.

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 imagen

black-forest-labs/flux-2-klein-9b-lora/edit

Precio

OpciónUSD
Predeterminado$0.0252 por imagen

Parámetros

CampoTipoValor predeterminadoValores admitidosPara qué sirve
promptObligatoriostring—hasta 5000 caracteresSay what to change and what must stay the same. Put a LoRA trigger phrase first.
image_urlsObligatorioarray<string (uri)>—hasta 3 elementosOne to three source images, in the order your prompt refers to them.
aspect_ratioOpcionalstringautoauto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21Output aspect ratio; auto keeps the shape of the first source image.
resolutionOpcionalstring1k1k, 2kOutput size tier when you choose an aspect ratio; with auto the result keeps the shape of the first source image at about one megapixel.
lorasOpcionalarray<object>[]hasta 3 elementosUp to three LoRA weight files trained for FLUX.2 [klein] 9B (the distilled or the Base build), each with its own strength.
seedOpcionalinteger—de 0 a 2147483647Random seed for controlled comparisons.

Solicitud de ejemplo

Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.

El ejemplo usa archivos de muestra de PopNow en image_urls. Cámbialos por tus propios enlaces HTTPS públicos, archivos subidos o recursos guardados.

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-2-klein-9b-lora/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"
    ]
  }
}'

La respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.

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"

Siguientes pasos

En esta página