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.

~76.02s
~$0.074
 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

POSThttps://api.segmind.com/v1/flux-ipadapter

Parameters

imagerequired
string (uri)

URL of the input image

Default: "https://segmind-sd-models.s3.amazonaws.com/display_images/assets_statue.jpeg"
promptrequired
string

Description of the image to be generated

Default: "wearing sunglasses with red hair"
adapter_strengthoptional
number

Strength of the adapter effect

Default: 1Range: 0 - 1
base64optional
boolean

Output as base64 encoded string

Default: false
guidance_scaleoptional
number

Guidance scale for the generation

Default: 3.5Range: 1 - 10
image_formatoptional
string

Output image format

Default: "jpeg"
Allowed values :
"jpeg""png""webp"
negative_promptoptional
string

Description of what to avoid in the image

Default: ""
num_inference_stepsoptional
integer

Number of inference steps

Default: 20Range: 10 - 75
qualityoptional
integer

Image quality setting for output

Default: 95Range: 10 - 100
samplesoptional
integer

Number of samples to generate

Default: 1Range: 1 - 4
seedoptional
integer

Random seed for generation

Default: 32556
strengthoptional
number

Strength of the effect applied

Default: 1Range: 0 - 2
true_gsoptional
number

True guidance scale value

Default: 2Range: 1 - 10

Response 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