Guides
AI FASHION MODEL V4
Private model

Private model

💡
Before you start, make sure you have read Quick start documentation.

This tutorial will guide you through the process of creating a private model. Let's say you have an private model image and you want to use this model to try on different clothes like shown below.

Private model
Private model
Target clothes
Target clothes
Private model with target clothes
Private model with target clothes

Now follow the steps below to create a private model and generate a private model with different clothes.

Create private model

You can create a private model through Create private model API. This API reuqires a reference image of the private model as input to learn the model's facial features. The reference image must match the following requirements:

  • Clear facial features.
  • No occlusion on the face.
  • Only single person in the image.

Assume that https://storage.pixocial.com/vmake/rztxkbmedijpiew416twuqo7.jpeg (opens in a new tab) is the reference image of the private model. You can create a private model by sending a POST request to the following endpoint:

🌐
POST https://open.vmake.ai/api/v3/image/ai-fashion-model/private-models

The request body should look like the following:

{
    "image": "https://storage.pixocial.com/vmake/rztxkbmedijpiew416twuqo7.jpeg",
    "name": "Lisa",
    "skin": "fair",
    "gender": "female",
    "age": "middle-aged"
}
  • image: The reference image of the private model.
  • name: The name of the private model.
  • skin: The skin tone of the private model.
  • gender: The gender of the private model.
  • age: The age group of the private model.

For more information about the request body, you can refer to the Create private model API documentation.

After sending the request, you will receive a response with the private model id. You can use this private model id to generate a model with different clothes.

{
    "code": 0,
    "message": "Success",
    "data": {
        "privateModelId": "private-1795006395658145792"
    }
}

Get private model list

You can get the list of private models you have created through the Get private model list API.

🌐
GET https://open.vmake.ai/api/v3/image/ai-fashion-model/private-models

The response will contain the list of private models you have created.

{
    "code": 0,
    "message": "Success",
    "data": {
        "models": [
            {
                "id": "private-1795006395658145792",
                "name": "Lisa",
                "thumbnail": "URL",
                "gender": "female",
                "skin": "fair",
                "age": "middle-aged"
            },
            {
                "id": "private-1755066466379632640",
                "name": "John",
                "thumbnail": "URL",
                "gender": "male",
                "skin": "fair",
                "age": "youth"
            }
        ]
    }
}

Get private model information

You can get the information of a private model by sending a GET request to the following endpoint:

🌐
GET https://open.vmake.ai/api/v3/image/ai-fashion-model/private-models/{id}

Replace {id} with the private model ID you want to get information about, for example, "private-1795006395658145792". The response will contain the information of the private model.

{
    "code": 0,
    "message": "Success",
    "data": {
        "id": "private-1795006395658145792",
        "name": "Lisa",
        "thumbnail": "URL",
        "gender": "female",
        "skin": "fair",
        "age": "middle-aged"
    }
}

Delete private model

You can delete a private model by sending a DELETE request to the following endpoint:

🌐
DELETE https://open.vmake.ai/api/v3/image/ai-fashion-model/private-models/{id}
⚠️
After deleting a private model, you will not be able to recover it.

Replace {id} with the private model ID you want to delete, for example, "private-1795006395658145792". After sending the request, you will receive a response with the message "Success" if the private model is deleted successfully.

{
    "code": 0,
    "message": "Success"
}

Create model generation task

Now you have created a private model with the ID "private-1795006395658145792". The private model ID can also be assigned to the modelId field in the request body of the create model generation task to generate a private model with different clothes. The request body should look like the following:

{
    "image": "https://storage.pixocial.com/vmake/r55wtm74wgt9ghgywwrhkvwh.png",
    "modelId": "private-1795006395658145792",
    "sceneType": "preset",
    "sceneId": "035"
}

For more information about create model generation task, you can refer to the Quick start documentation. If everything goes well, you will get a private model with different clothes like the one shown at the top of this page.