SegFIT: Segmind Fashion and Immersive Try-on
SegFIT by Segmind is a cutting-edge virtual try-on (VTON) model that enables ultra-realistic clothing visualization on custom fashion models.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/segfit"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "outfit_image": "https://segmind-inference-inputs.s3.ap-south-1.amazonaws.com/a8b0d0b4-8b45-4ff4-b42e-66c96c0070ee.jpeg",
12 "gender": "woman",
13 "nationality": "indian",
14 "location": "garden",
15 "prompt_clothing": "cloth,dress,stripes,lace",
16 "seed": 42,
17 "image_format": "png",
18 "image_quality": 95,
19 "base64": false
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25 result = response.json()
26 print(json.dumps(result, indent=2))
27else:
28 print(f"Error: {response.status_code}")
29 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/segfit"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "outfit_image": "https://segmind-inference-inputs.s3.ap-south-1.amazonaws.com/a8b0d0b4-8b45-4ff4-b42e-66c96c0070ee.jpeg",
12 "gender": "woman",
13 "nationality": "indian",
14 "location": "garden",
15 "prompt_clothing": "cloth,dress,stripes,lace",
16 "seed": 42,
17 "image_format": "png",
18 "image_quality": 95,
19 "base64": false
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25 result = response.json()
26 print(json.dumps(result, indent=2))
27else:
28 print(f"Error: {response.status_code}")
29 print(response.text)API Endpoint
https://api.segmind.com/v1/segfitParameters
outfit_imagerequiredstring (uri)URL of the outfit image to use as reference
base64optionalbooleanReturn image as base64 string
falsegenderoptionalstringGender of the model
image_formatoptionalstringFormat of the output image
"png""png""jpg""jpeg""webp"image_qualityoptionalintegerQuality of the output image (1-100)
90Range: 1 - 100locationoptionalstringBackground location for the image
model_imageoptionalstring (uri)url or base64 of the model image (optional)
nullmodel_maskoptionalstring (uri)url or base64 of the model mask (optional)
nullnationalityoptionalstringNationality of the model
prompt_clothingoptionalstringCloth details, use it when model image/mask is not provided
seedoptionalintegerSeed for image generation
-1Range: -1 - 999999999999999Response 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