PopNowDocs API
Contenuto principale

Riferimento API di FLUX.1 Fill Dev LoRA

Inpainting a maschera su FLUX.1 Fill con le tue LoRA

Con una sola chiave API di PopNow chiami FLUX.1 Fill Dev LoRA dal tuo codice. Qui trovi gli ID del modello da inviare, ogni campo di input accettato, quanto costa ogni richiesta in USD e una richiesta da incollare nel terminale così com’è.

Le descrizioni dei parametri provengono dallo schema di input del modello e sono disponibili solo in inglese.

In sintesi

Sviluppato da
Black Forest Labs
Risultato
Immagine
Da
$0.042 USD per immagine
Tempo tipico
circa 47 s

I prezzi sono indicati in USD e gli importi vengono addebitati sul tuo saldo PopNow. Alla ricezione viene riservato il massimo importo; al termine viene addebitato il consumo effettivo e il resto viene sbloccato. Le attività fallite non vengono addebitate. Per un preventivo esatto prima di eseguire, usa POST /api/v1/jobs/quote.

Modifica immagine

black-forest-labs/flux-1-fill-dev-lora/edit

Prezzo

OpzioneUSD
Predefinito$0.042 per immagine

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring—fino a 5000 caratteriDescribe what belongs in the white area of the mask, in the light and style of the rest of the picture.
image_urlObbligatoriostring (uri)——Source image to repaint. The result keeps its aspect ratio.
mask_urlObbligatoriostring (uri)——Black-and-white mask the size of the source: white areas are redrawn, black areas are kept.
resolutionFacoltativostring1k1k, 1.5kLength of the output's long side: 1k is 1024 pixels, 1.5k is 1536. The source's aspect ratio is kept.
num_outputsFacoltativointeger1da 1 a 4How many images to generate in one run, from 1 to 4.
lorasFacoltativoarray<object>[]fino a 3 elementiUp to three LoRA weight files trained for FLUX.1 dev, each with its own strength.
guidance_scaleFacoltativonumber30da 28 a 35How closely the filled area follows the prompt, from 28 to 35.
stepsFacoltativointeger28da 1 a 50Denoising steps, from 1 to 50. Fewer steps return faster and a little softer.
seedFacoltativointeger—da 0 a 2147483647Random seed for controlled comparisons.

Richiesta di esempio

Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.

L’esempio usa file di prova di PopNow in image_url, mask_url. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "black-forest-labs/flux-1-fill-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",
    "mask_url": "https://media.popnow.ai/influencer/examples/marco.webp",
    "num_outputs": 1
  }
}'

La risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.

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"

Passi successivi

In questa pagina