Riferimento API di FLUX.1 Dev LoRA
Il classico FLUX.1 Dev con fino a tre tue LoRA
Con una sola chiave API di PopNow chiami FLUX.1 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.018 USD per immagine
- Tempo tipico
- circa 19 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-1-dev-lora/text-to-image
Prezzo
| Opzione | USD |
|---|---|
Predefinito | $0.018 per immagine |
Parametri
| Campo | Tipo | Predefinito | Valori ammessi | A cosa serve |
|---|---|---|---|---|
promptObbligatorio | string | — | fino a 5000 caratteri | Describe the subject, composition and lighting. If a LoRA has a trigger word, put it first. |
aspect_ratioFacoltativo | string | 1:1 | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21 | Output aspect ratio. |
lorasFacoltativo | array<object> | [] | fino a 3 elementi | Up to three LoRA weight files, 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.
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 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"Modifica immagine
black-forest-labs/flux-1-dev-lora/edit
Prezzo
| Opzione | USD |
|---|---|
Predefinito | $0.018 per immagine |
Parametri
| Campo | Tipo | Predefinito | Valori ammessi | A cosa serve |
|---|---|---|---|---|
promptObbligatorio | string | — | fino a 5000 caratteri | Describe the whole image you want back; with a mask, describe what belongs in the white area. |
image_urlObbligatorio | string (uri) | — | — | Source image to edit. The result keeps its shape. |
mask_urlFacoltativo | string (uri) | — | — | Optional black-and-white mask the size of the source: white areas are redrawn, black areas are kept. |
strengthFacoltativo | number | 0.8 | da 0 a 1 | How far to move away from the source, from 0 to 1. |
lorasFacoltativo | array<object> | [] | fino a 3 elementi | Up to three LoRA weight files, 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 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?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 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"
