Riferimento API di FLUX.1 Dev ControlNet LoRA
Controllo di posa, profondità o contorni su FLUX.1, con le tue LoRA
Con una sola chiave API di PopNow chiami FLUX.1 Dev ControlNet LoRA dal tuo codice. Qui trovi gli ID del modello da inviare, ogni campo di input accettato, quanti crediti costa ogni richiesta 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
- 5.4 crediti per immagine ($0.054)
1 credito = 0,01 $. All’accettazione l’attività trattiene l’importo massimo possibile e alla fine addebita il consumo reale, arrotondato al credito superiore; il resto viene sbloccato. Le attività non riuscite non vengono addebitate. Per conoscere la cifra esatta prima di eseguire, chiama POST /api/v1/jobs/quote.
Crea immagine
black-forest-labs/flux-1-dev-controlnet-lora/text-to-image
Prezzo
| Opzione | Crediti (per immagine) | Dollari USA |
|---|---|---|
Predefinito | 5.4 | $0.054 |
Parametri
| Campo | Tipo | Predefinito | Valori ammessi | A cosa serve |
|---|---|---|---|---|
promptObbligatorio | string | — | fino a 5000 caratteri | Describe the picture you want: subject, clothing, setting and light. The control image only sets the layout. |
control_image_urlObbligatorio | string (uri) | — | — | Control image: a pose skeleton, depth map, canny or soft-edge line map, or a grayscale or plain photo. The result keeps its aspect ratio. |
control_strengthFacoltativo | number | 0.7 | da 0 a 1 | How strongly the result follows the control image, from 0 to 1. |
control_guidance_startFacoltativo | number | 0 | da 0 a 1 | Fraction of the denoising steps at which the control image starts to apply, from 0 to 1. |
control_guidance_endFacoltativo | number | 0.8 | da 0 a 1 | Fraction of the denoising steps at which the control image stops applying, from 0 to 1; not before the start. |
resolutionFacoltativo | string | 1k | 1k, 1.5k | Length of the output's long side: 1k is 1024 pixels, 1.5k is 1536. The control image's aspect ratio is kept. |
num_outputsFacoltativo | integer | 1 | da 1 a 4 | How many images to generate in one run, from 1 to 4. |
lorasFacoltativo | array<object> | [] | fino a 3 elementi | Up to three LoRA weight files trained for FLUX.1 dev, each with its own strength. |
guidance_scaleFacoltativo | number | 3.5 | da 0 a 20 | How closely the image follows the prompt, from 0 to 20. |
stepsFacoltativo | integer | 28 | da 1 a 50 | Denoising steps, from 1 to 50. Fewer steps return faster and a little softer. |
output_formatFacoltativo | string | jpeg | jpeg, png, webp | Container of the returned image. |
seedFacoltativo | integer | — | da 0 a 2147483647 | Random 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 control_image_url. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.
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-dev-controlnet-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",
"control_image_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.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
