Flux Krea Dev
FLUX.1 Krea generates stunning, photorealistic images with fine-tuned aesthetic control for diverse creative applications.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/flux-krea-dev"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "seed": 42,
12 "prompt": "A miniature raccoon explorer made of wool wearing all kinds of equipment, the whole world is made of felt textile, holding a signboard which says 'Flux krea dev on Segmind'",
13 "go_fast": true,
14 "guidance": 3,
15 "megapixels": "1",
16 "num_outputs": 2,
17 "aspect_ratio": "16:9",
18 "output_format": "jpg",
19 "output_quality": 90,
20 "prompt_strength": 0.7,
21 "num_inference_steps": 40,
22 "disable_safety_checker": false
23}
24
25response = requests.post(url, headers=headers, json=data)
26
27if response.status_code == 200:
28 result = response.json()
29 print(json.dumps(result, indent=2))
30else:
31 print(f"Error: {response.status_code}")
32 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/flux-krea-dev"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "seed": 42,
12 "prompt": "A miniature raccoon explorer made of wool wearing all kinds of equipment, the whole world is made of felt textile, holding a signboard which says 'Flux krea dev on Segmind'",
13 "go_fast": true,
14 "guidance": 3,
15 "megapixels": "1",
16 "num_outputs": 2,
17 "aspect_ratio": "16:9",
18 "output_format": "jpg",
19 "output_quality": 90,
20 "prompt_strength": 0.7,
21 "num_inference_steps": 40,
22 "disable_safety_checker": false
23}
24
25response = requests.post(url, headers=headers, json=data)
26
27if response.status_code == 200:
28 result = response.json()
29 print(json.dumps(result, indent=2))
30else:
31 print(f"Error: {response.status_code}")
32 print(response.text)API Endpoint
https://api.segmind.com/v1/flux-krea-devParameters
promptrequiredstringGuide the AI with text for the image generation. Short and imaginative prompts work best; imaginative scenes suggest detailed descriptions.
aspect_ratiooptionalstringDecide image proportions. Use '1:1' for square or other ratios for landscapes or portraits.
"16:9""1:1""16:9""21:9""3:2""2:3""4:5""5:4""3:4""4:3""9:16"+1 moredisable_safety_checkeroptionalbooleanToggle safety checker to allow all image outputs. Disable to maximize creative freedom.
falsego_fastoptionalbooleanEnable faster predictions; less deterministic but quicker. Disable for exact replication and improved detail.
trueguidanceoptionalnumberControls adherence to prompt. Increase for more accuracy; decrease for creative variance.
7Range: 0 - 10imageoptionalstring (uri)Input an image to guide the output. Match aspect ratio to maintain consistency; use any for unique results.
nullmegapixelsoptionalnumberChoose resolution size. Use '1' for high-quality or '0.25' for faster, lower-resolution outputs.
110.25num_inference_stepsoptionalintegerAdjust the number of processing steps. Higher gives better quality; lower speeds up.
40Range: 1 - 50num_outputsoptionalintegerSet the number of images generated. Choose more for variability or single for speed.
2Range: 1 - 4output_formatoptionalstringSelect image format. Use 'webp' for web-friendly, 'jpg' for compression, or 'png' for quality.
"jpg""webp""jpg""png"output_qualityoptionalintegerSet image saving quality. Choose 100 for best or lower for smaller file size.
90Range: 0 - 100prompt_strengthoptionalnumberDefines prompt influence in img2img mode. High values alter original image more significantly.
0.7Range: 0 - 1seedoptionalintegerThe seed ensures reproducibility. Use specific numbers for consistent results or leave random for variability.
42Response Type
Returns: Image
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out