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-ipadapter
Parameters
image
requiredstring (uri)
URL of the input image
"https://segmind-sd-models.s3.amazonaws.com/display_images/assets_statue.jpeg"
prompt
requiredstring
Description of the image to be generated
"wearing sunglasses with red hair"
adapter_strength
optionalnumber
Strength of the adapter effect
1
Range: 0 - 1base64
optionalboolean
Output as base64 encoded string
false
guidance_scale
optionalnumber
Guidance scale for the generation
3.5
Range: 1 - 10image_format
optionalstring
Output image format
"jpeg"
"jpeg"
"png"
"webp"
negative_prompt
optionalstring
Description of what to avoid in the image
""
num_inference_steps
optionalinteger
Number of inference steps
20
Range: 10 - 75quality
optionalinteger
Image quality setting for output
95
Range: 10 - 100samples
optionalinteger
Number of samples to generate
1
Range: 1 - 4seed
optionalinteger
Random seed for generation
32556
strength
optionalnumber
Strength of the effect applied
1
Range: 0 - 2true_gs
optionalnumber
True guidance scale value
2
Range: 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