PopNowDocs de la API
Contenido principal

Referencia de la API de FLUX.1 Dev LoRA

El clásico FLUX.1 Dev con hasta tres de tus LoRA

Con una sola clave de API de PopNow puedes llamar a FLUX.1 Dev 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 19 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-1-dev-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, composition and lighting. If a LoRA has a trigger word, put it first.
aspect_ratioOpcionalstring1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21Output aspect ratio.
lorasOpcionalarray<object>[]hasta 3 elementosUp to three LoRA weight files, each with its own strength.
guidance_scaleOpcionalnumber3.5de 0 a 20How closely the image follows the prompt, from 0 to 20.
stepsOpcionalinteger28de 1 a 50Denoising steps, from 1 to 50. Fewer steps return faster and a little softer.
output_formatOpcionalstringjpegjpeg, png, webpContainer of the returned image.
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-1-dev-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-1-dev-lora/edit

Precio

OpciónUSD
Predeterminado$0.018 por imagen

Parámetros

CampoTipoValor predeterminadoValores admitidosPara qué sirve
promptObligatoriostring—hasta 5000 caracteresDescribe the whole image you want back; with a mask, describe what belongs in the white area.
image_urlObligatoriostring (uri)——Source image to edit. The result keeps its shape.
mask_urlOpcionalstring (uri)——Optional black-and-white mask the size of the source: white areas are redrawn, black areas are kept.
strengthOpcionalnumber0.8de 0 a 1How far to move away from the source, from 0 to 1.
lorasOpcionalarray<object>[]hasta 3 elementosUp to three LoRA weight files, each with its own strength.
guidance_scaleOpcionalnumber3.5de 0 a 20How closely the image follows the prompt, from 0 to 20.
stepsOpcionalinteger28de 1 a 50Denoising steps, from 1 to 50. Fewer steps return faster and a little softer.
output_formatOpcionalstringjpegjpeg, png, webpContainer of the returned image.
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_url. 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-1-dev-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_url": "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