Model Swap

These APIs can be used to generate catalogs. You can upload images of humans and mannequins wearing garments and can swap them with customized Fashion Models and Backgrounds based on prompts.

Mannequin to Fashion Model

Human to Fashion Model

Upload Image

post

API to upload Mannequin/Human Image for to replace with Fashion Model and Custom Background.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
imagestring · binaryOptional

all image file types are supported

typestringOptional

this will be always model for cataloging

Example: model
genderstringOptional

male or female

Example: male
preprocessstringOptional

if you want to use this image just for cataloging(and not for virtual try-on) set preprocess false

Example: false
accessstringOptional

private or public

Example: private
Responses
200

Successful response

application/json
post
/api/v1/experiment_image/
200

Successful response

Get Status of Uploaded Image

get

API to get the status of uploaded image, if uploaded, in response preprocessing key will have the value completed

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID of uploaded image

Responses
200

Successful response

application/json
get
/api/v1/experiment_image/{id}/

Start the Model/Mannequin Swap

post

API to start the Mannequin/Model Swap using previously uploaded Image IDs. Provide appropriate prompt to customize Output Image

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
model_idstringOptional

ID you get after uploading mannequin/human image

Example: xxxxxxxxxx
paramsstringOptional

Prompts for Fashion Model and Background and other tuning factors

Example: {'prompt': 'RAW photo, hyper-realistic image of a female of asian ethnicity, looking at camera, straight hair, 19 years age, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3', 'guidance_scale': 10.0, 'strength': 0.8, 'num_inference_steps': 30, 'seed':-1, 'garment_class': 'upper garment', 'negative_prompt': '(hands:1.15), disfigured, ugly, bad, immature, cartoon, anime, 3d, painting, b&w, (ugly), (pixelated), watermark, glossy, smooth'}
actionstringOptional

name of AI model to be used, for current use case use model_swap

Example: model_swap
Responses
200

Successful response

No content

post
/api/v1/experiment/

No content

Get Status of Model Swap

get

API to get status of Model Swapping(Takes about 25 Seconds)

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID of Cataloging image

Responses
200

Successful response

No content

get
/api/v1/experiment/{id}/

No content

Download the Swapped Image

get

API to Download Images

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID of image to be downloaded

tokenstringRequired

Image Token from Uplaoded/Model Swapped Image

Responses
200

Successful response

application/json
get
/api/v1/ei/{id}/d?token={token}/

Last updated