1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/flux-2-max";
const data = {
"prompt": "technical_specs:\nmedium: Commercial magazine photography\nstyle: Clean, high-energy editorial\ncamera: Phase One XF, 80mm medium format lens\nlighting: Professional studio lighting, soft key light, even fill to eliminate harsh shadows\ntexture: Sharp, high-resolution digital, smooth skin texture\n\nsetting:\nlocation:\nname: Professional Photography Studio\nzone: Seamless cyclorama wall with geometric props\nbackground_elements:\n- Solid peach-orange seamless backdrop\n- Stacked orange and apricot-colored geometric cubes and rectangular pedestals\n- Minimalist, clean studio floor\nmagazine_layout:\nmasthead: 'Women's Health' in large light green serif typography at the top\nheadlines:\n- 'Spring forward: How to eat, travel and sweat'\n- '15 skincare habits beauty founders swear by'\n- 'Fake Views: Inside the scroll holes'\n- 'The Workout'\ncolor_palette: Triadic scheme of Forest Green, Vibrant Orange, and Pastel Green/White\n\nsubject:\ncharacter: Fit athletic woman, mid-20s\nappearance:\nhair: Long, wavy honey blonde hair with a side part, cascading over one shoulder\nskin: Healthy, glowing, athletic tan with natural skin texture\nmakeup: Dewy 'no-makeup' look, neutral lip balm, groomed eyebrows\nattire:\ntop: Dark forest green lightweight zip-up windbreaker jacket, sleeves slightly bunched at elbows\nbase_layer: Matching vibrant orange sports bra and high-waisted athletic shorts\nfootwear: Classic white leather sneakers with three black stripes and gum-colored soles\naccessories: White crew-length athletic socks with bold black 'SAME' text branding\npose: Confident seated stance on stacked cubes, legs spread wide, leaning slightly forward, elbows resting on thighs\nemotion:\nprimary: Empowered, cool, and confident\ngaze: Direct, intense eye contact with the camera\n\nlighting_and_atmosphere:\nkey_light: Large overhead softbox providing even illumination\nfill_light: Reflected light from the orange props giving a warm glow to the skin\ncontrast: Crisp definition with soft, controlled shadows to emphasize muscle tone",
"seed": 123,
"width": 1024,
"height": 1024,
"safety_tolerance": 3,
"output_format": "png"
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();Guide image creation using detailed phrases. Use vivid imagery for complexity, simple for minimalism.
Provide high-quality image URLs for reference. Use clear images for accuracy, diverse for variety.
Use specific numbers for consistent images. Random values automatically generate new images.
Determine image width. Set higher for detailed images, lower for speed.
Determine image height. Use larger values for quality, smaller for faster results.
Adjust safety for content moderation. Higher for strict checks, lower for flexibility.
min : 0,
max : 6
Select image format for output. Use 'jpeg' for compressed quality, 'png' for transparency needs.
Allowed values:
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Edited by Segmind Team on December 22, 2025.
FLUX.2 Max by Black Forest Labs is the flagship model of the FLUX.2 series that works exceptionally well as an advanced image generation tool. It stands out for its ability to create lifelike images with stable editing performance and precise adherence to prompts, as it understands context while utilizing real-time web data, ensuring accurate and relevant outcomes. It is an ideal option for generating product imagery and detailed retexturing to maintain character consistency across various projects, making it a dependable, high-end solution for commercial and creative needs, a perfect asset for professionals who can utilize FLUX.2 Max for refined, production-quality visuals.
Clarity Over Length: Use vivid yet precise language for complex scenes - "sunlight filtering through dense oak canopy casting dappled shadows." Also, it is effective to keep prompts concise for simpler subjects.
Reference Images: Leverage image_urls parameter for character consistency or style matching. Furthermore, high-quality, clear reference images produce significantly better results.
Dimension Strategy: Standard 1024x1024 balances quality and speed; increase the resolution for detailed commercial work, or decrease it for rapid iteration.
Seed Control: Set specific seed values (e.g., 123) for reproducible results during editing workflows; omit the seed value or randomize for creative exploration.
Safety Tolerance: Default (3) works for most commercial content; adjust to a higher value for strict brand guidelines, or lower for artistic flexibility.
Format Selection: Choose PNG when transparency or lossless quality (preserving every detail) is required; opt for JPEG to reduce file size for web-optimized delivery.
What makes FLUX.2 Max different from other FLUX.2 models?
You may choose any of these models based on the project's quality requirements and scope.
Is FLUX.2 Max open-source?
FLUX.2 Max is Black Forest Labs's proprietary commercial model, accessible through API integration. It is not open-source, hence ensuring consistency, support, and enterprise-grade reliability.
How do I achieve character consistency across multiple images?
Use the image_urls parameter to provide high-quality reference images of your subject. You can also combine with specific seed values to maintain identity across generations while varying poses, settings, or lighting.
What's the optimal resolution for product photography?
1024x1024 provides excellent baseline quality. If you need to design print-ready assets or hero images, scale up to 1536x1536 or higher. You can balance dimensions with your delivery requirements; web assets rarely need maximum resolution.
Can FLUX.2 Max generate images with transparency?
Yes, select PNG as output_format to preserve alpha channels. This is essential for product cutouts, overlay graphics, and compositing workflows.
How does real-time web data improve generation quality?
FLUX.2 Max references current web information to produce contextually accurate, trend-aware visuals. It's a useful feature for editorial content, seasonal campaigns, or culturally relevant imagery that needs a contemporary feel.