PopNowDocs API
Contenuto principale

Riferimento API di FLUX.2 Klein 9B LoRA

FLUX.2 Klein 9B veloce che carica fino a tre tue LoRA

Con una sola chiave API di PopNow chiami FLUX.2 Klein 9B 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.018 USD per immagine
Tempo tipico
circa 17 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.

Crea immagine

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

Prezzo

OpzioneUSD
Predefinito$0.018 per immagine

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring—fino a 5000 caratteriDescribe the subject, setting, light and style in plain sentences. Put a LoRA trigger phrase first.
aspect_ratioFacoltativostring1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21Output aspect ratio.
resolutionFacoltativostring1k1k, 2kOutput size tier: 1k is about one megapixel, 2k is 2048 pixels on the long side.
lorasFacoltativoarray<object>[]fino a 3 elementiUp to three LoRA weight files trained for FLUX.2 [klein] 9B (the distilled or the Base build), each with its own strength.
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.

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 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"

Modifica immagine

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

Prezzo

OpzioneUSD
Predefinito$0.0252 per immagine

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring—fino a 5000 caratteriSay what to change and what must stay the same. Put a LoRA trigger phrase first.
image_urlsObbligatorioarray<string (uri)>—fino a 3 elementiOne to three source images, in the order your prompt refers to them.
aspect_ratioFacoltativostringautoauto, 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.
resolutionFacoltativostring1k1k, 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.
lorasFacoltativoarray<object>[]fino a 3 elementiUp to three LoRA weight files trained for FLUX.2 [klein] 9B (the distilled or the Base build), each with its own strength.
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_urls. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.

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 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