{"slug":"Flux_2_Klein_4B_BF16","routeSlug":"flux2-klein-4b-bf16","name":"FLUX.2 Klein 4B BF16","developer":"Black Forest Labs","modality":"image","inferenceTypes":["txt2img","img2img"],"surface":"both","infrastructure":"native-fleet","planRequired":"basic","status":"standard_model","tags":["Native GPU Fleet","OpenAI-compatible"],"description":"256–1024px resolution (16px steps). Default: 1024×1024, 4 steps. Guidance: 1.0 (fixed). Unified model for generation and multi-reference editing. Sub-second inference.","useCases":["Run FLUX.2 Klein 4B BF16 via unified v2 jobs with free pre-run /price quotes","Drop-in compatible with the OpenAI SDK via the OpenAI-compatible gateway","Low-latency pay-as-you-go inference on direct GPU capacity"],"samplePrompt":"A cinematic, hyper-realistic eye-level shot through a rainy coffee shop window at night. Condensation on the glass is partially wiped away to reveal the handwritten text 'KLEIN 4B' clearly written in the moisture. Through the clear glass, a warm, cozy interior is visible with soft bokeh lights. Outside, reflections of blue and pink neon city lights dance on the wet glass droplets. Incredible texture detail on the water drops and glass surface. 8k resolution, shot on 35mm lens, f/1.4, street photography style.","pricing":{"unit":"Resolution × steps","headlineRate":"$0.00243 / 512×512 (4 steps)","hasLiveQuoteEndpoint":true,"quoteEndpoint":"/api/v2/quote","isEstimated":false,"notes":"Supports up to 3 input images for editing; 256–1536px in steps of 16."},"specs":{"limits":{"min_px":256,"max_px":1536,"step_px":16,"max_input_images":3}},"links":{"html":"https://runstage.dev/models/flux2-klein-4b-bf16","markdown":"https://runstage.dev/models/flux2-klein-4b-bf16.md","json":"https://runstage.dev/models/flux2-klein-4b-bf16.json","playground":"https://runstage.dev/playground?model=Flux_2_Klein_4B_BF16"},"snippets":{"curl":"# 1. Free pre-run retail quote\ncurl -X POST 'https://runstage.dev/api/v2/quote' \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"Flux_2_Klein_4B_BF16\",\"width\":1024,\"height\":1024,\"steps\":4}'\n\n# 2. Submit metered job\ncurl -X POST 'https://runstage.dev/api/v2/run' \\\n  -H \"Authorization: Bearer $RUNSTAGE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{   \"model\": \"Flux_2_Klein_4B_BF16\",   \"prompt\": \"A cinematic, hyper-realistic eye-level shot through a rainy coffee shop window at night. Condensation on the glass is partially wiped away to reveal the handwritten text '\\''KLEIN 4B'\\'' clearly written in the moisture. Through the clear glass, a warm, cozy interior is visible with soft bokeh lights. Outside, reflections of blue and pink neon city lights dance on the wet glass droplets. Incredible texture detail on the water drops and glass surface. 8k resolution, shot on 35mm lens, f/1.4, street photography style.\",   \"width\": 1024,   \"height\": 1024,   \"steps\": 4,   \"seed\": 42 }'\n\n# Optional: switch to image editing (img2img) by uploading multipart -F \"image=@input.png\"\n# curl -X POST 'https://runstage.dev/api/v2/run' -H \"Authorization: Bearer $RUNSTAGE_API_KEY\" --form-string 'model=Flux_2_Klein_4B_BF16' --form-string 'prompt=A cinematic, hyper-realistic eye-level shot through a rainy coffee shop window at night. Condensation on the glass is partially wiped away to reveal the handwritten text '\\''KLEIN 4B'\\'' clearly written in the moisture. Through the clear glass, a warm, cozy interior is visible with soft bokeh lights. Outside, reflections of blue and pink neon city lights dance on the wet glass droplets. Incredible texture detail on the water drops and glass surface. 8k resolution, shot on 35mm lens, f/1.4, street photography style.' -F \"image=@input.png\"\n\n# 3. Poll owner-scoped job result until status is \"done\" or \"failed\"\ncurl -H \"Authorization: Bearer $RUNSTAGE_API_KEY\" \\\n  'https://runstage.dev/api/v2/jobs/<request_id>'","typescript":"const headers = {\n  Authorization: `Bearer ${process.env.RUNSTAGE_API_KEY}`,\n  \"Content-Type\": \"application/json\",\n};\n\n// 1. Free pre-run retail quote\nconst quote = await fetch(\"https://runstage.dev/api/v2/quote\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\" },\n  body: JSON.stringify({\n  \"model\": \"Flux_2_Klein_4B_BF16\",\n  \"width\": 1024,\n  \"height\": 1024,\n  \"steps\": 4\n}),\n}).then((r) => r.json());\nconsole.log(\"Quoted USD:\", quote.data?.price);\n\n// 2. Submit metered job\nconst job = await fetch(\"https://runstage.dev/api/v2/run\", {\n  method: \"POST\",\n  headers,\n  body: JSON.stringify({\n  \"model\": \"Flux_2_Klein_4B_BF16\",\n  \"prompt\": \"A cinematic, hyper-realistic eye-level shot through a rainy coffee shop window at night. Condensation on the glass is partially wiped away to reveal the handwritten text 'KLEIN 4B' clearly written in the moisture. Through the clear glass, a warm, cozy interior is visible with soft bokeh lights. Outside, reflections of blue and pink neon city lights dance on the wet glass droplets. Incredible texture detail on the water drops and glass surface. 8k resolution, shot on 35mm lens, f/1.4, street photography style.\",\n  \"width\": 1024,\n  \"height\": 1024,\n  \"steps\": 4,\n  \"seed\": 42\n}),\n}).then((r) => r.json());\n\n// 3. Poll owner-scoped job status until terminal\nlet result;\nfor (let i = 0; i < 60; i++) {\n  result = await fetch(`https://runstage.dev/api/v2/jobs/${job.data.request_id}`, {\n    headers: { Authorization: headers.Authorization },\n  }).then((r) => r.json());\n  if ([\"done\", \"failed\", \"refunded\"].includes(result.data?.status)) break;\n  await new Promise((r) => setTimeout(r, 2000));\n}\nconsole.log(\"Status:\", result?.data?.status, result?.data?.result_url);","python":"import os, time, requests\n\nheaders = {\"Authorization\": f\"Bearer {os.environ['RUNSTAGE_API_KEY']}\"}\n\n# 1. Free pre-run retail quote\nquote = requests.post(\n    \"https://runstage.dev/api/v2/quote\",\n    json={\n    \"model\": \"Flux_2_Klein_4B_BF16\",\n    \"width\": 1024,\n    \"height\": 1024,\n    \"steps\": 4\n},\n    timeout=15,\n).json()\nprint(\"Quoted USD:\", quote[\"data\"][\"price\"])\n\n# 2. Submit metered job\njob = requests.post(\n    \"https://runstage.dev/api/v2/run\",\n    headers=headers,\n    json={\n    \"model\": \"Flux_2_Klein_4B_BF16\",\n    \"prompt\": \"A cinematic, hyper-realistic eye-level shot through a rainy coffee shop window at night. Condensation on the glass is partially wiped away to reveal the handwritten text 'KLEIN 4B' clearly written in the moisture. Through the clear glass, a warm, cozy interior is visible with soft bokeh lights. Outside, reflections of blue and pink neon city lights dance on the wet glass droplets. Incredible texture detail on the water drops and glass surface. 8k resolution, shot on 35mm lens, f/1.4, street photography style.\",\n    \"width\": 1024,\n    \"height\": 1024,\n    \"steps\": 4,\n    \"seed\": 42\n},\n    timeout=30,\n).json()\njob_id = job[\"data\"][\"request_id\"]\n\n# 3. Poll owner-scoped job status until terminal\nresult = None\nfor _ in range(60):\n    result = requests.get(f\"https://runstage.dev/api/v2/jobs/{job_id}\", headers=headers, timeout=15).json()\n    if result[\"data\"][\"status\"] in (\"done\", \"failed\", \"refunded\"):\n        break\n    time.sleep(2)\nprint(\"Status:\", result[\"data\"][\"status\"], result[\"data\"].get(\"result_url\"))"}}