Flux Ipadapter
Flux IP Adapter is a cutting-edge AI model that lets you to create stunning, customized images. With its advanced style adaptation capabilities, Flux IP Adapter lets you seamlessly blend different artistic styles into your creations.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/flux-ipadapter"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "adapter_strength": 1,
12 "base64": false,
13 "guidance_scale": 3.5,
14 "image": "https://segmind-sd-models.s3.amazonaws.com/display_images/assets_statue.jpeg",
15 "image_format": "jpeg",
16 "num_inference_steps": 20,
17 "prompt": "wearing sunglasses with red hair",
18 "quality": 95,
19 "samples": 1,
20 "seed": 32556,
21 "strength": 1,
22 "true_gs": 2
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-ipadapter"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "adapter_strength": 1,
12 "base64": false,
13 "guidance_scale": 3.5,
14 "image": "https://segmind-sd-models.s3.amazonaws.com/display_images/assets_statue.jpeg",
15 "image_format": "jpeg",
16 "num_inference_steps": 20,
17 "prompt": "wearing sunglasses with red hair",
18 "quality": 95,
19 "samples": 1,
20 "seed": 32556,
21 "strength": 1,
22 "true_gs": 2
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-ipadapterParameters
imagerequiredstring (uri)URL of the input image
"https://segmind-sd-models.s3.amazonaws.com/display_images/assets_statue.jpeg"promptrequiredstringDescription of the image to be generated
"wearing sunglasses with red hair"adapter_strengthoptionalnumberStrength of the adapter effect
1Range: 0 - 1base64optionalbooleanOutput as base64 encoded string
falseguidance_scaleoptionalnumberGuidance scale for the generation
3.5Range: 1 - 10image_formatoptionalstringOutput image format
"jpeg""jpeg""png""webp"negative_promptoptionalstringDescription of what to avoid in the image
""num_inference_stepsoptionalintegerNumber of inference steps
20Range: 10 - 75qualityoptionalintegerImage quality setting for output
95Range: 10 - 100samplesoptionalintegerNumber of samples to generate
1Range: 1 - 4seedoptionalintegerRandom seed for generation
32556strengthoptionalnumberStrength of the effect applied
1Range: 0 - 2true_gsoptionalnumberTrue guidance scale value
2Range: 1 - 10Response 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