Multi Image Kontext Max
FLUX.1 Kontext [max] creates stunning, photorealistic images from text prompts and input images seamlessly.
~18.27s
$0.1 per generation
1import requests
2import json
3
4url = "https://api.segmind.com/v1/multi-image-kontext-max"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "seed": 42,
12 "prompt": "put the green dress on the woman while maintaining the pose of the woman as it is",
13 "aspect_ratio": "1:1",
14 "input_image_1": "https://segmind-resources.s3.amazonaws.com/output/9cb479d3-5c5f-4d5d-a782-972acbc42598-c1.jpg",
15 "input_image_2": "https://segmind-resources.s3.amazonaws.com/output/79feee7b-d09f-4bde-bec3-c8e8a8703f04-d2.png",
16 "output_format": "jpg",
17 "safety_tolerance": 1
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/multi-image-kontext-max"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "seed": 42,
12 "prompt": "put the green dress on the woman while maintaining the pose of the woman as it is",
13 "aspect_ratio": "1:1",
14 "input_image_1": "https://segmind-resources.s3.amazonaws.com/output/9cb479d3-5c5f-4d5d-a782-972acbc42598-c1.jpg",
15 "input_image_2": "https://segmind-resources.s3.amazonaws.com/output/79feee7b-d09f-4bde-bec3-c8e8a8703f04-d2.png",
16 "output_format": "jpg",
17 "safety_tolerance": 1
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text)API Endpoint
POST
https://api.segmind.com/v1/multi-image-kontext-maxParameters
input_image_1requiredstring (uri)First image for transformation
Default:
"https://segmind-resources.s3.amazonaws.com/output/9cb479d3-5c5f-4d5d-a782-972acbc42598-c1.jpg"input_image_2requiredstring (uri)Second image for transformation.
Default:
"https://segmind-resources.s3.amazonaws.com/output/79feee7b-d09f-4bde-bec3-c8e8a8703f04-d2.png"promptrequiredstringDescribes the prompt for image transformation.
Default:
"put the green dress on the woman while maintaining the pose of the woman as it is"aspect_ratiooptionalstringSets output aspect ratio. Use '16:9' for wide images.
Default:
"16:9"Allowed values (14 total):
"match_input_image""1:1""16:9""9:16""4:3""3:4""3:2""2:3""4:5""5:4"+4 moreoutput_formatoptionalstringSets output forma.
Default:
"jpg"Allowed values :
"jpg""png"safety_toleranceoptionalintegerControls content safety level. Use 1 for moderate strictness.
Default:
1Range: 0 - 2seedoptionalintegerSets seed for reproducibility.
Default:
42Response Type
Returns: Image
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
400
Bad Request
Invalid parameters or request format
401
Unauthorized
Missing or invalid API key
403
Forbidden
Insufficient permissions
404
Not Found
Model or endpoint not found
406
Insufficient Credits
Not enough credits to process request
429
Rate Limited
Too many requests
500
Server Error
Internal server error
502
Bad Gateway
Service temporarily unavailable
504
Timeout
Request timed out