Référence API de FLUX 3 Klein
FLUX 3 Klein rapide : images et retouches multi-références en 1K ou 2K
Une seule clé API PopNow suffit pour appeler FLUX 3 Klein 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 USD 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
- $0.012 USD par image
- Durée habituelle
- environ 17 s
- Identifiants de modèle
Les prix sont affichés en USD et les frais sont déduits de votre solde PopNow. Le montant maximal est réservé à la réception de la tâche, puis la consommation réelle est facturée à la fin et le solde libéré. Les tâches en échec ne sont pas facturées. Obtenez un devis exact avant de lancer avec POST /api/v1/jobs/quote.
Créer une image
black-forest-labs/flux-3-klein/text-to-image
Prix
| Option | USD |
|---|---|
1k | $0.012 par image |
2k | $0.048 par image |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
promptObligatoire | string | — | jusqu’à 5 000 caractères | Describe the subject, setting, light and style in plain sentences. |
aspect_ratioFacultatif | string | 1:1 | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9, 9:21, 2:1, 1:2, 3:1, … (+2) | Output aspect ratio; custom lets you set width and height. |
resolutionFacultatif | string | 1k | 1k, 2k | Output size tier: 1k is about one megapixel, 2k about four. |
widthFacultatif | integer | — | de 256 à 1024 | Output width in pixels when aspect_ratio is custom, 256 to 1024 (1024 if left out); height works the same way. The price still follows resolution. |
heightFacultatif | integer | — | de 256 à 1024 | Output height in pixels when aspect_ratio is custom, 256 to 1024 (1024 if left out); width works the same way. The price still follows resolution. |
enable_prompt_expansionFacultatif | boolean | false | — | Rewrite the prompt into a fuller description before generating. Off by default, so the prompt is followed word for word. |
output_formatFacultatif | string | jpeg | jpeg, png, webp | File format 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.
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-3-klein/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",
"resolution": "1k"
}
}'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"Modifier une image
black-forest-labs/flux-3-klein/edit
Prix
| Option | USD |
|---|---|
1k | $0.0192 par image |
2k | $0.0768 par image |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
promptObligatoire | string | — | jusqu’à 5 000 caractères | Say what to change and what must stay the same; name each source as <ref_image_1>, <ref_image_2>. |
image_urlsObligatoire | array<string (uri)> | — | jusqu’à 10 éléments | One to ten source images, in the order your prompt refers to them. The second and third each raise the price a little; more do not. |
aspect_ratioFacultatif | string | auto | auto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9, 9:21, 2:1, 1:2, … (+3) | Output aspect ratio; auto keeps the shape of the first source image, custom lets you set width and height. |
resolutionFacultatif | string | 1k | 1k, 2k | Output size tier: 1k is about one megapixel, 2k about four. |
widthFacultatif | integer | — | de 256 à 1024 | Output width in pixels when aspect_ratio is custom, 256 to 1024 (1024 if left out); height works the same way. The price still follows resolution. |
heightFacultatif | integer | — | de 256 à 1024 | Output height in pixels when aspect_ratio is custom, 256 to 1024 (1024 if left out); width works the same way. The price still follows resolution. |
enable_prompt_expansionFacultatif | boolean | false | — | Rewrite the prompt into a fuller description before generating. Off by default, so the prompt is followed word for word. |
output_formatFacultatif | string | jpeg | jpeg, png, webp | File format 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 image_urls. 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?wait=60" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "black-forest-labs/flux-3-klein/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"
],
"resolution": "1k"
}
}'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"
