Référence API de FLUX.1 Dev ControlNet LoRA
Contrôle par pose, profondeur ou contours sur FLUX.1, avec tes LoRA
Une seule clé API PopNow suffit pour appeler FLUX.1 Dev ControlNet LoRA depuis votre code. Vous trouverez ici les identifiants de modèle à envoyer, chaque champ d’entrée accepté, le coût d’une requête en crédits et une requête à coller telle quelle dans un terminal.
Les descriptions des paramètres proviennent du schéma d’entrée du modèle et ne sont disponibles qu’en anglais.
En bref
- Éditeur
- Black Forest Labs
- Résultat
- Image
- À partir de
- 5.4 crédits par image ($0.054)
- Identifiants de modèle
1 crédit = 0,01 $. À l’acceptation, une tâche réserve le montant maximal possible, puis facture la consommation réelle à la fin, arrondie au crédit supérieur ; le reste est libéré. Une tâche en échec n’est pas facturée. Pour connaître le montant exact avant de lancer, appelez POST /api/v1/jobs/quote.
Créer une image
black-forest-labs/flux-1-dev-controlnet-lora/text-to-image
Prix
| Option | Crédits (par image) | Dollars US |
|---|---|---|
Par défaut | 5.4 | $0.054 |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
promptObligatoire | string | — | jusqu’à 5 000 caractères | Describe the picture you want: subject, clothing, setting and light. The control image only sets the layout. |
control_image_urlObligatoire | 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_strengthFacultatif | number | 0.7 | de 0 à 1 | How strongly the result follows the control image, from 0 to 1. |
control_guidance_startFacultatif | number | 0 | de 0 à 1 | Fraction of the denoising steps at which the control image starts to apply, from 0 to 1. |
control_guidance_endFacultatif | number | 0.8 | de 0 à 1 | Fraction of the denoising steps at which the control image stops applying, from 0 to 1; not before the start. |
resolutionFacultatif | 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_outputsFacultatif | integer | 1 | de 1 à 4 | How many images to generate in one run, from 1 to 4. |
lorasFacultatif | array<object> | [] | jusqu’à 3 éléments | Up to three LoRA weight files trained for FLUX.1 dev, each with its own strength. |
guidance_scaleFacultatif | number | 3.5 | de 0 à 20 | How closely the image follows the prompt, from 0 to 20. |
stepsFacultatif | integer | 28 | de 1 à 50 | Denoising steps, from 1 to 50. Fewer steps return faster and a little softer. |
output_formatFacultatif | string | jpeg | jpeg, png, webp | Container of the returned image. |
seedFacultatif | integer | — | de 0 à 2147483647 | Random seed for controlled comparisons. |
Exemple de requête
Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.
L’exemple utilise des fichiers d’exemple PopNow dans control_image_url. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.
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 réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
