Referencia de la API de FLUX 3 Klein
FLUX 3 Klein rápido: imágenes y ediciones con varias referencias en 1K o 2K
Con una sola clave de API de PopNow puedes llamar a FLUX 3 Klein desde tu propio código. Aquí tienes los ID de modelo que debes enviar, cada campo de entrada que acepta, cuánto cuesta cada solicitud en USD y una petición que puedes pegar tal cual en la terminal.
Las descripciones de los parámetros vienen del esquema de entrada del modelo y solo están en inglés.
De un vistazo
- Creado por
- Black Forest Labs
- Resultado
- Imagen
- Desde
- $0.012 USD por imagen
- Tiempo habitual
- unos 17 s
Los precios se muestran en USD y se cobran de tu saldo de PopNow. Al aceptar la tarea se reserva el importe máximo; al terminar se cobra el uso real y se libera el resto. Las tareas fallidas no se cobran. Consulta POST /api/v1/jobs/quote para obtener un presupuesto exacto antes de ejecutar.
Crear imagen
black-forest-labs/flux-3-klein/text-to-image
Precio
| Opción | USD |
|---|---|
1k | $0.012 por imagen |
2k | $0.048 por imagen |
Parámetros
| Campo | Tipo | Valor predeterminado | Valores admitidos | Para qué sirve |
|---|---|---|---|---|
promptObligatorio | string | — | hasta 5000 caracteres | Describe the subject, setting, light and style in plain sentences. |
aspect_ratioOpcional | 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. |
resolutionOpcional | string | 1k | 1k, 2k | Output size tier: 1k is about one megapixel, 2k about four. |
widthOpcional | integer | — | de 256 a 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. |
heightOpcional | integer | — | de 256 a 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_expansionOpcional | boolean | false | — | Rewrite the prompt into a fuller description before generating. Off by default, so the prompt is followed word for word. |
output_formatOpcional | string | jpeg | jpeg, png, webp | File format of the returned image. |
seedOpcional | integer | — | de 0 a 2147483647 | Random seed for controlled comparisons. |
Solicitud de ejemplo
Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en 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 respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Editar imagen
black-forest-labs/flux-3-klein/edit
Precio
| Opción | USD |
|---|---|
1k | $0.0192 por imagen |
2k | $0.0768 por imagen |
Parámetros
| Campo | Tipo | Valor predeterminado | Valores admitidos | Para qué sirve |
|---|---|---|---|---|
promptObligatorio | string | — | hasta 5000 caracteres | Say what to change and what must stay the same; name each source as <ref_image_1>, <ref_image_2>. |
image_urlsObligatorio | array<string (uri)> | — | hasta 10 elementos | 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_ratioOpcional | 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. |
resolutionOpcional | string | 1k | 1k, 2k | Output size tier: 1k is about one megapixel, 2k about four. |
widthOpcional | integer | — | de 256 a 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. |
heightOpcional | integer | — | de 256 a 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_expansionOpcional | boolean | false | — | Rewrite the prompt into a fuller description before generating. Off by default, so the prompt is followed word for word. |
output_formatOpcional | string | jpeg | jpeg, png, webp | File format of the returned image. |
seedOpcional | integer | — | de 0 a 2147483647 | Random seed for controlled comparisons. |
Solicitud de ejemplo
Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.
El ejemplo usa archivos de muestra de PopNow en image_urls. Cámbialos por tus propios enlaces HTTPS públicos, archivos subidos o recursos guardados.
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 respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
