页面简介
FLUX.2 is the recommended model for text-to-image generation. Generate high-fidelity images with advanced control, exact colors, and flexible aspect ratios.
正文摘录
FLUX.2 brings enterprise-grade efficiency and professional precision to text-to-image generation. It closes the gap between generated and real imagery with accurate hands, faces, and textures—all while respecting brand guidelines through hex-code color steering. [max] offers the highest quality with grounding search for real-time information. Try it live — Test FLUX.2 [max], [pro], [flex] and [klein] in the playground. [klein] is also available on Hugging Face. Examples Photorealistic At high noon on a blustery day, capture the surreal presence of a sentient tree, seemingly rooted underwater just off a tumultuous ocean shore. Employ a sweeping panning shot, bathing the scene in cinematic natural light and a stark palette of winter whites and greys, as if glimpsing a spectral sentinel through a watery veil. Typography & Design Samsung Galaxy S25 Ultra product advertisement, 'Ultra-strong titanium' headline, 'Shielded in a strong titanium frame, your Galaxy S25 Ultra always stays protected' subtext, close-up of phone edge showing titanium frame, dark gradient background, clean minimalist tech aesthetic, professional product photography Photorealism & DetailCinematic lightingRealistic skin texture and lightingHyper-realistic close upProduct photography qualityTypography & DesignData visualization with clean typographyAd creative with embedded textMagazine cover layoutAutomotive ad with headlineGrounding SearchFLUX.2 [max] searches the web when prompted, so you can generate visuals grounded in real-time information — sports scores, weather, or historical events.Score of a previous football gameThe weather in real-time of FreiburgRe-create historical events: 'GC4Q+2V Berlin, Nov. 9th 1989'Next Starlink satellite launchExact Color ControlSpecify brand colors via hex codes with precision matching — no approximation.Hex colors applied to vase and flowersA vase on a table in living room, the color of the vase is a gradient of color, starting with color #02eb3c and finishing with color #edfa3c. The flowers inside the vase have the color #ff0088Brand color matchingLuxury eyeshadow palette with 6 pans: top row #B76E79, #E8D5B7, #8B4789; bottom row #CD7F32, #F8F6F0, #800020Structured PromptingUse JSON-structured prompts for precise control over generation — ideal for production workflows and automation.Example: Structured Prompting{ "subject": "Mona Lisa painting by Leonardo da Vinci", "background": "museum gallery wall, ornate gold frame", "lighting": "soft gallery lighting, warm spotlights", "style": "digital art, high contrast", "camera_angle": "eye level view", "composition": "centered, portrait orientation" } Eye Level ViewWorm's Eye ViewCreative & CultureConsistent comic book style across panelsConsistent comic book style across panelsConsistent comic book style across panelsConsistent comic book style across panels API Integration Create Request create_request.shcreate_request.pyrequest=$(curl -X POST \ 'https://api.bfl.ai/v1/flux-2-pro-preview' \ -H 'accept: application/json' \ -H "x-key: ${BFL_API_KEY}" \ -H 'Content-Type: application/json' \ -d '{ "prompt": "A serene mountain landscape at golden hour, soft diffused light filtering through clouds", "width": 1024, "height": 1024 }') echo $request request_id=$(echo $request | jq -r .id) polling_url=$(echo $request | jq -r .polling_url) Poll for Result poll_result.shpoll_result.pywhile true; do sleep 0.5 result=$(curl -s -X 'GET' \ "${polling_url}" \ -H 'accept: application/json' \ -H "x-key: ${BFL_API_KEY}") status=$(echo $result | jq -r .status) echo "Status: $status" if [ "$status" == "Ready" ]; then echo "Result: $(echo $result | jq -r .result.sample)" break elif [ "$status" == "Error" ] || [ "$status" == "Failed" ]; then echo "Generation failed: $result" break fi done Signed URLs are only valid for 10 minutes. Please retrieve your result within this timeframe. For all available parameters, endpoints, and model options, see the API Reference.Was this page helpful?YesNo