FLUX.2-klein-4B · nearai
The FLUX.2 [klein] model family are our fastest image models to date. FLUX.2 [klein] unifies generation and editing in a single compact architecture, delivering state-of-the-art quality with end-to-end inference in as low as under a second. Built for applications that require real-time image generation without sacrificing quality.
Entrada, $/1M $0.012 / imagen
Salida, $/1M $1.00
Precio, $ $0.012 / imagen
Contexto 128 000
Salida máx. 1
Acepta texto
Última comprobación 04.11.2026 12:00:14 UTC
Fuente página del proveedor
Alertas de precio
API
API compatible con OpenAI: los SDK oficiales de OpenAI funcionan con esta URL base. Sustituye YOUR_API_KEY por tu clave del proveedor.
| URL base de la API | |
|---|---|
| Endpoint | |
| ID del modelo | |
curl
curl https://cloud-api.near.ai/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "black-forest-labs/FLUX.2-klein-4B", "prompt": "a lighthouse at sunset", "n": 1, "size": "1024x1024"}'Python
import requests
r = requests.post(
"https://cloud-api.near.ai/v1/images/generations",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"model": "black-forest-labs/FLUX.2-klein-4B",
"prompt": "a lighthouse at sunset",
"n": 1,
"size": "1024x1024"
},
)
print(r.json())JavaScript
const r = await fetch("https://cloud-api.near.ai/v1/images/generations", {
method: "POST",
headers: {Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json"},
body: JSON.stringify({
"model": "black-forest-labs/FLUX.2-klein-4B",
"prompt": "a lighthouse at sunset",
"n": 1,
"size": "1024x1024"
}),
});
console.log(await r.json());Solicitud (JSON)
{
"model": "black-forest-labs/FLUX.2-klein-4B",
"prompt": "a lighthouse at sunset",
"n": 1,
"size": "1024x1024"
}Respuesta (JSON)
{
"created": 1760000000,
"data": [
{
"url": "https://...",
"b64_json": null
}
]
}La dirección se toma de la lista de modelos del proveedor; compruébala con su documentación.
Source: AI Rate Card, https://airatecard.com/es/c/offer%3Anearai%7Cblack-forest-labs/FLUX.2-klein-4B, prices checked 2026-11-04; seller's page: https://near.ai/models/black-forest-labs/FLUX.2-klein-4B
Datos técnicos
ID: offer:nearai|black-forest-labs/FLUX.2-klein-4B