Flux Redux Dev
Open-weight image variation model. Create new versions while preserving key elements of your original.
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/flux-redux-dev"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "seed": 30255,
12    "guidance": 3,
13    "megapixels": "1",
14    "num_outputs": 1,
15    "redux_image": "https://segmind-sd-models.s3.us-east-1.amazonaws.com/display_images/flux-tools/flux-dev-redux-ip.png",
16    "aspect_ratio": "1:1",
17    "output_format": "jpg",
18    "output_quality": 80,
19    "num_inference_steps": 28,
20    "disable_safety_checker": false
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26    result = response.json()
27    print(json.dumps(result, indent=2))
28else:
29    print(f"Error: {response.status_code}")
30    print(response.text) 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/flux-redux-dev"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "seed": 30255,
12    "guidance": 3,
13    "megapixels": "1",
14    "num_outputs": 1,
15    "redux_image": "https://segmind-sd-models.s3.us-east-1.amazonaws.com/display_images/flux-tools/flux-dev-redux-ip.png",
16    "aspect_ratio": "1:1",
17    "output_format": "jpg",
18    "output_quality": 80,
19    "num_inference_steps": 28,
20    "disable_safety_checker": false
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26    result = response.json()
27    print(json.dumps(result, indent=2))
28else:
29    print(f"Error: {response.status_code}")
30    print(response.text)API Endpoint
https://api.segmind.com/v1/flux-redux-devParameters
redux_imagerequiredstring (uri)Input image to condition your output on. This replaces prompt for FLUX.1 Redux models
"https://segmind-sd-models.s3.us-east-1.amazonaws.com/display_images/flux-tools/flux-dev-redux-ip.png"aspect_ratiooptionalstringAspect ratio for the generated image
"1:1""1:1""16:9""21:9""3:2""2:3""4:5""5:4""3:4""4:3""9:16"+1 moredisable_safety_checkeroptionalbooleanDisable safety checker for generated images.
falseguidanceoptionalnumberGuidance for generated image
3Range: 0 - 10megapixelsoptionalnumberApproximate number of megapixels for generated image. Use match_input to match the size of the input (with an upper limit of 1440x1440 pixels)
110.25num_inference_stepsoptionalintegerNumber of denoising steps. Recommended range is 28-50
28Range: 1 - 50num_outputsoptionalintegerNumber of outputs to generate
1Range: 1 - 4output_formatoptionalstringFormat of the output images
"jpg""webp""jpg""png"output_qualityoptionalintegerQuality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs
80Range: 0 - 100seedoptionalintegerRandom seed. Set for reproducible generation
30255Response 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